Reputation: 1640
Say I have
word
^ Cursor Here
and I want it to be
w
If I use de
I end up just deleting the entire word. I could just press the right arrow key once but that requires me to lift my hands defeats the purpose. I Need a way to delete from the character directly following until the end of the word. I could be overdoing it a little here though.
Upvotes: 0
Views: 1037
Reputation: 3062
The problem here is that you're using the arrow keys to move rather than hjkl
keys.
While it feels very wrong to use them when you've been used to the arrow
keys from so many other programs, it only takes a week or two of forcing
yourself to use hjkl
. Once that's done, the benefits are with you for every
extra second, minute, hour you spend in vim for as long as you use it as your editor.
In your case you would just type lde
to move right one character, and delete to the
beginning of the next word.
Upvotes: 1
Reputation: 2546
If you do a remap, then you can create a shortcut for it. For instance:
noremap <C-t> :norm lde<Cr>
will remap ctrl+t
to move right with l
, delete to end de
, then enter <CR>
. This assumes your cursor is at the beginning of a word.
Upvotes: 2