If you run vi/vim in screen, when you press a cursor in insert mode, you get a new line + a character, which is a pain.
How can I configure vim to move around instead?
If you run vi/vim in screen, when you press a cursor in insert mode, you get a new line + a character, which is a pain.
How can I configure vim to move around instead?
Put the following in you ~/.exrc file
map! ^[OA ^[ka
map! ^[OB ^[ja
map! ^[OD ^[i
map! ^[OC ^[la
Note: ^[ is the “ctrl-v Esc” key presses. Copy and paste will not work.
Start vi with
vim
instead of
vi
as vim isn't affected by this issue!
Arrow keys are nice, but you should try to get used to using "hjkl" to move around in vi. This always works, so you won't need to worry about changing the config file on every system where you have this problem.
"Get used to "hjkl"" : the best answer. Saving yet another customisation to keep track of.