3 ms·
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 h
by shadeless 10y ago
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.
- capote 10y agoAh. Now I look like I'm vim-dumb.
- soyiuz 10y agoNo 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-motions http://vimdoc.sourceforge.net/htmldoc/motion.html#object-mot... and http://vimdoc.sourceforge.net/htmldoc/motion.html#word http://vimdoc.sourceforge.net/htmldoc/motion.html#word