My arrow keys don\'t work in vi in insert mode at home, they just each insert a newline and a capital letter, like \'A\'. Is there a way to fix that?
:set term=builtin_ansi
fixed it for me. You can either paste that into vim while in escape mode, (bleep mode) or add it to the end of ~/.vimrc without the leading ":"
vi does not support arrow keys in insert mode. Use vim. Although your vi may just be a link to vim, it may be configured to behave like the "original" vi and thus disables the arrow keys. Just invoke vim directly.
I had same issue with arrow keys, but when I used did that set nocp or nocompatible then my backspace didn't work correctly
for some reason when I installed vim with
sudo apt-get install vim
, vi didn't had any issues with arrows or backspace anymore
You might also want to try 'noesckeys'
I just had an issue with arrow keys after switching over to use git in .vim.
I have installed this repo - https://github.com/sunaku/.vim
and after digging around for an hour, I found that AutoClose plugin (which didn't like anyway) broke the arrow keys.
The plugin docs suggest that one should set set ttimeoutlen=100, but that didn't work for me! (using urxvt+screen or urxvt, and even xterm)
So I removed the plugin at the end.
I presume you're using vim as this is tagged as Linux. Try:
:set nocompatible
(You may want to configure your .vimrc with this by adding this command to it. Create a new .vimrc file if not already present in your home directory, run echo $HOME
to check home directory path.)