Reputation: 271634
I have a big bear in my bed.
Suppose I have the cursor on "bear", in the "e" position, how would I delete the word "bear" completely?
Upvotes: 23
Views: 25514
Reputation: 67047
As an alternative to larsmans answer, you could go back with b and then d elete everything un t il the next space: dtspace.
This mnemonic is more general and you could use it with several separators.
If you want to delete backward, use dTspace.
To learn more left-right-motions, ask for :he left-right-motions
and read the end of the chapter.
Upvotes: 11
Reputation: 516
You could maybe check this out.. delete word after or around cursor in VIM. Seems similar to what you need..
Normal mode:
daw : delete the word under the cursor
caw : delete the word under the cursor and put you in insert mode
Upvotes: 40