Consider the following text snippet:
Now, if the cursor is at
W takes me to
value2) which is as expected. But if I do
dW at the same position, what I expect is:
But what I get is:
Which motions are linewise, inclusive or exclusive is mentioned with the command. There are however, two general exceptions: 1. If the motion is exclusive and the end of the motion is in column 1, the end of the motion is moved to the end of the previous line and the motion becomes inclusive. Example: "}" moves to the first line after a paragraph, but "d}" will not include that line. exclusive-linewise 2. If the motion is exclusive, the end of the motion is in column 1 and the start of the motion was at or before the first non-blank in the line, the motion becomes linewise. Example: If a paragraph begins with some blanks and you do "d}" while standing on the first non-blank, all the lines of the paragraph are deleted, including the blanks. If you do a put now, the deleted lines will be inserted below the cursor position.
I am not sure if either of the exceptions applies to my case. What's going on?
:version VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jan 9 2018 04:14:45) Included patches: 1-662 Modified by <firstname.lastname@example.org> Compiled by <email@example.com> Huge version without GUI. Features included (+) or not (-): ...