Arrow Keys in VI

On a clean install of Ubuntu 10.04 and 12.04, you may find that using vi to edit any file may not work well.
Hitting i may not display “INSERT” at the bottom of the screen, hitting the arrow keys may only cause A, B, C, or D to be typed on the screen (instead of actually moving the cursor), the Backspace key may not work, etc.

To get it to work more like you’re expecting, open a terminal and type this:

echo set nocompatible > ~/.vimrc && echo set backspace=2 >> ~/.vimrc

Alternatively, you can install VIM to get the keys working and have a better-displayed editing experience:

sudo apt-get install vim