In vim, in normal mode, if the cursor is in a word, not the last letter, de
deletes the suffix of the word, from the position of the cursor. If the cursor is on the last letter, x
does it too, while de
would jump to the end of the next word.
What command would you use that would work in both cases, last letter or not?
The purpose is to include the command in a macro.
Try vwged
instead of de
, and define a mapping like the following, if you
like it.
:nnoremap <leader>de vwged
It seems to do exactly what you want.
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