Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can easily delete the last 3 words in a line in any other text editor just as fast.

Press End to move the cursor to the end. Then hold CTRL-SHIFT and hit left arrow 3 times to highlight the last three words. Press Delete or Backspace. It's just as fast as typing "$ 3b D" and is far more intuitive.



Don't even need to highlight the words. Just hit the end-key and then press Ctrl+Backspace three times.

I know. It was just an example to illustrate the sort of syntax that you'll find more of.

If I myself actually properly knew Vim, I would have given you an example that by itself is most definitely quicker than normal keybindings, too. But I figured, if you actually care to understand, you'll see that it's just an example, if you don't, then you won't.

All I know, is that you can find videos of people using Vim well and they're most definitely faster than anyone I've ever seen with a normal text editor.


There's a lot more physical movement involved in the end/ctrl+backspace method, even though it's fewer keystrokes.

The big thing with Vim's modal editing is that it allows you to have keyboard shortcuts involving keys that aren't way off in the boonies. Some examples:

* / or ? to search for text

* dd to delete the current line

* Stuff like ciw or ci" will delete a word or the contents of a double-quoted string, and drop you into insert mode. I use this one constantly.

When prompted, people try to come up with really crazy complex things, but frankly the bigger thing is just being able to actually reach things.

If I tried to use shortcuts in other editors to the extent that I do in vim, my hands would constantly be in pain. This is why I never got into emacs, though I've seen some folks be terrifyingly fast with it as well.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: