Hacker News new | ask | show | jobs
by soyiuz 3716 days ago
I would suggest that Vim is about more than speed, it is about flow. Think about the difference between ctrl-c and navigating to the menu to copy with your mouse. One just feels more fluid and requires less thinking. Games use extensive keybindings for the same reason.

Vim in particular is a philosophy of keybindings. It has a syntax and a logic to it. For example `daw` will delete a word. To delete a sentence you would `das`. Guess what you would use to delete a paragraph? Once you "grock" vim logic you can perform more complex actions without much cognitive overhead and with your fingers on the home row. Writing in Vim gives me a feeling of mastery and fluidity with the machine I have not felt since my competitive gaming days.

2 comments

> For example `daw` will delete a word. To delete a sentence you would `das`.

Huh. I use 'dw' and 'dl'. Why the extra key?

Using 'dw' deletes from the cursor until the end of the word.

Using 'daw' deletes the whole word "around" the cursor (hence 'a' command) - meaning you don't have to pay attention to the cursor position, it could be on the start/middle/end of the word and the result would be the same.

Ah. Now I look like I'm vim-dumb.
No worries. There's always more to learn. `dw` is a motion command as in "delete to the end of the word. `daw` is a text object command as in "delete a word." There is also a difference between `daw` and `diw`, which is delete inner word, and `daW` which is delete a WORD.

See http://vimdoc.sourceforge.net/htmldoc/motion.html#object-mot...

and

http://vimdoc.sourceforge.net/htmldoc/motion.html#word

I'd imagine it's because delete a word is easier to remember. Just sticks in the mind better, if that makes sense.
`daw` will delete a word

The equivalent in any Mac OS X text editor is:

alt-left-shift-right-backspace.

It is not quite the same, as per above comment. `daw` will delete the word regardless of the cursor position. Vim has the idea of text objects beyond "end of the word."