I'm now switching to VIM
from TextMate. I found ^+W
in INSERT mode very useful. However, I'd like to delete not only the word before cursor, but the word after or around cursor as well.
I did some googling, but the only thing I can find was ^+W
to delete word BEFORE cursor.
To delete a word, position the cursor at the beginning of the word and type dw . The word and the space it occupied are removed. To delete part of a word, position the cursor on the word to the right of the part to be saved. Type dw to delete the rest of the word.
If the mapping is always wanted, place the above in your vimrc.
Normal mode:
daw : delete the word under the cursor caw : delete the word under the cursor and put you in insert mode
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With