5 ms·
Try with `vim -u NONE` to ignore your .vimrc . If the buffer is “asdf jkl” with your cursor at the beginning of the line, after dw the buffer is “jkl”. With th
by umanwizard 6y ago
Try with `vim -u NONE` to ignore your .vimrc .
If the buffer is “asdf jkl” with your cursor at the beginning of the line, after dw the buffer is “jkl”. With the same starting buffer, after cw, the buffer is “ jkl”, with a space at the beginning (which is the same behavior as ce).
This “inconsistent” behavior is probably what you usually want, but it does indeed break the invariant that c<motion> is equivalent to d<motion>i .
- chrismorgan 6y ago> the invariant that c<motion> is equivalent to d<motion>i Nit: that invariant also doesn’t work when the motion takes you to the end of the line because of how the cursor is one character wide in normal mode and zero characters wide in insert mode. On a buffer “asdf jkl” with the cursor on the letter f, c$x gets you “asd|” (| representing the cursor location), whereas d$ix gets you “as|d”.