This has always bugged me about the w
and W
motion commands—they seem to work differently when used with the c
hange command than they do when used alone, or with the d
elete command.
For example, with the cursor on the "q" of this text:
The quick brown fox jumps over the lazy dog.
typing dw
results in
The brown fox jumps over the lazy dog.
and typing de
results in
The brown fox jumps over the lazy dog.
(Notice the two spaces between "The" and "brown".)
The y
ank command also treats w
and e
differently, as can be shown by comparing yeP
:
The quickquick brown fox jumps over the lazy dog.
and ywP
:
The quick quick brown fox jumps over the lazy dog.
However, typing either ceslow<Esc>
or cwslow<Esc>
results in the same thing:
The slow brown fox jumps over the lazy dog.
Is this documented somewhere? What is the logic behind it and how can I predict the results of a command that uses w
?