Consider this code:
foo = (int)someVariable - 42; bar = someFunction('someArgument') + 42;
By placing the cursor on the leading character of
someFunction we can experiment with
diw. We can see that the commands have the following behaviour regarding the deletion of whitespace from the Left and Right sides:
L? R? ---------- daw Y Y dw . Y diw . . L?: Deletes whitespace from the left R?: Deletes whitespace from the right
daw command will delete whitespace from either side of the text, whereas
dw will only delete from the right and
diw will not delete whitespace from either side. Is there a command that will delete whitespace only from the left, but not from the right?
Note that this is not an issue that I am having with VIM, but rather my experimentation to learn the editor better.