Showing posts with label keys. Show all posts
Showing posts with label keys. Show all posts

Tuesday, October 5, 2010

The 'vi' arrow keys not working in Ubuntu

Most people get this issue of arrow keys not working for 'vi' in Ubuntu. Instead, it displays A, B, C, and D characters.

This is because the default 'vi' in Ubuntu is a vi 'light' version (that is the vim-tiny package). This does not use the arrow keys as you would expect.

If you want the arrow keys to function you have to install the 'full' vim package. By this you not only get the arrow keys working but also other nice features such as colored syntax.

Just installing the 'vim' package should get you fixed up. Try:

sudo apt-get install vim
or
sudo apt-get install vim-full

'vim-full' will install all the vim related package and the dependencies, that includes gnome libs, etc... if you don't use gnome and just want to fix this issue in the text mode you can also run :

sudo apt-get install vim-runtime