-
Notifications
You must be signed in to change notification settings - Fork 9
Description
The delete word and change word command behave strangely, both by themselves and with a multiplier (e.g. d2w)
I'll use square brackets to show the cursor. In Vim, if I have the following text
[d]isplacement.x(); timer.stop();
and press dw, I get the following result:
[.]x(); timer.stop();
which is what you would expect: a word has been deleted and the cursor moves to just after where the word was.
Using text mate, I get this instead:
.x(); []timer.stop();
So the correct word has been deleted, but the cursor goes way after where it should be.
That is annoying enough, but at least the delete works. Unfortunately, when you try to delete two words (d2w), it doesn't work at all – it just moves the cursor. So if we start with our original text
[d]isplacement.x(); timer.stop();
and then press d2w, we just get this
displacement.x[](); timer.stop();
I suspect that in this case, the d command is being ignored and TextMate is just executing 2w, which works as expected.
It's a shame because the ability to do a command followed by an arbitrarily multiplied motion is one of the things that makes vi so efficient.