Fix for Ubuntu Vi editor retarded arrow keys

After a fresh installation of Ubuntu (or Kubuntu/LinuxMint), I noticed that the "vi" editor didnt use the arrow keys properly.

It was horribly annoying, and inserting/replacing characters with "A", "B", "C" or "D".
Also, the Home and End keys were acting up, replacing characters with "H" and "F".

The solution? Incredibly easy!
Apparently "vi" is a lightweight version of "vim", so just alias the vi command to use vim instead in your bashrc profile.

To do that:
1. Open up a terminal shell
2. Type: "vim ~/.bashrc" (you may need to create it first, by copying "cp ~/.bashrc_vanilla ~/.bashrc" for LinuxMint)
3. Go to the end of the file.
4. Type: "alias vi='vim' " at the end of the file
5. Save and exit.
6. Next time you start a terminal session, it'll automatically use vim whenever you type vi.

If you want to use it immediately, type the alias command in the terminal window and it'll take effect immediately.

*edited* 19/12/2008
Forgot to mention that you need to create the file first on LinuxMint by copying the vanilla file.

[ Source ]
Included source
Copyright © Twig's Tech Tips
Theme by BloggerThemes & TopWPThemes Sponsored by iBlogtoBlog