Why d{motion} command is not consistent with {motion} command in Vim?

de cuts everything from, and including, the character under the cursor up to, and including, the last character of the world, e is an inclusive motion.

dw cuts everything from, and including, the character under the cursor up to, and excluding, the next word, w is an exclusive motion.

The answer to your question is not in :help d (de and dw are perfectly consistent with it) but in :help e and :help w (e and w don’t have to work the same because, as the doc says, one is inclusive and the other exclusive).

Always keep in mind that everything in Vim is about composability: de is not de, it’s d applied to e.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)