Reputation: 313
Is there an existing command or a configuration for my .vimrc
that will make CTRL+right arrow go to the end of the line in insert mode instead of going to the next line? Like in most common editors, that shortcut jumps word by word, but in vim it goes to the next line when the cursor is at the last word in the line.
If there is a different fast way to jump to the end of the line in insert mode, that would also be useful.
Upvotes: 7
Views: 5201
Reputation: 54505
The Home and End keys are usually interpreted by vim in insert-mode as beginning and end of line (like 0
and $
), respectively.
This is documented in the ins-special-special
topic, e.g.,
:h ins-special-special
Upvotes: 2
Reputation: 12172
In general, the best way to navigate in vim is in normal mode, and not in insert mode. I suggest that instead of finding ways to navigate in insert mode, you use the power of normal mode as intended. There are many ways to do this, but here are a couple of suggestions:
If you want to navigate word by word (in normal mode), you can use w to move to the next word, or e to move to the end of the next word.
Upvotes: 13