Ubuntu - Making Vi more useable, more like CentOS


Ever get frustrated how using the arrow keys: up, down, left, and right, when using vi in ubuntu/xubuntu results in characters such as 'A' being input, instead of moving the cursor position? In vim.tiny, this does not happen, but I am too lazy to remember vim.tiny every time instead of vi, not to mention typing vi is a lot easier. The solution is to make vi command in the terminal actually call vim.tiny instead.

    echo "alias vi='vim.tiny'" >> ~/.bashrc
    Close your terminal
    Open your terminal again, and you can now just type vi instead of vim.tiny to edit files

The first statement just appended the line " vi='vim.tiny' " (including the single quotes) to the end of your '.bashrc' file in your home directory. This file is run every time you open up your terminal, so it wont take effect on any terminals you already have open. Enjoy!

No comments:

Post a Comment