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
vwgedinstead ofde, and define a mapping like the following, if youlike it.
It seems to do exactly what you want.