Debian comes with a version of vi that doesn’t handle arrow keys well especially in insert mode. Pressing arrow keys in vi displays letters instead of moving the cursor. Also it doesn’t do syntax highlighting. To fix it we need to install the full vim.
As root run the following command:
apt-get install vim |
Then edit the file /etc/vim/vimrc and make sure the following is uncommented:
syntax on set background=dark |
Also “set compatible” should be commented out.
This should fix the arrow keys issue in vi and also enable syntax highlighting.