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?
+5
A:
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.
lothar
2009-05-01 19:58:19
+7
A:
I presume you're using vim as this is tagged as Linux. Try:
:set nocompatible
(you may want to configure your .vimrc with this)
Brian Agnew
2009-05-01 19:59:39
Make sure you start vi with the command `vim` and not `vi`. Most of the advanced and useful features of `vim` are disabled by default unless you start it with `vim`.
pts
2009-05-01 21:17:24
@pts - only on broken systems. Starting vim as vi on all of my boxes works just fine; however, there are some CentOS boxes I have used that demonstrate the behavior you are talking about.
Chas. Owens
2009-05-01 22:22:01
A:
Ubuntu ships default with vim-tiny
, which doesn't have all the bells and whistles that vim has.
Do a quick sudo apt-get install vim
to get all the juicy features that everyone's talking about.
Han
2009-06-19 20:27:22