Replacing vi by vim

'vi' in Ubuntu already starts 'vim', although by default it starts 'vim-tiny' (which comes closest to the original 'vi' in its (lack of) features). You can see this with:

sudo update-alternatives --display vi

If you want it to use another version of vim, then make sure it's installed and run:

sudo update-alternatives --config vi

You can add

alias vi=vim

to ~/.bashrc . This will start vim whenever you type vi.

Note that in Ubuntu 10.10 (and I think also 10.04) vi is already mapped to vim.


In addition to what Peter Smit has suggested. You can do the following as well to make that change system wide rather than just your account.

add alias vi='vim' to /etc/bash.bashrc

or create a symlink to vim

sudo ln -s /usr/bin/vim /usr/bin/vi

However on my system both /usr/bin/vim and /usr/bin/vi are symlinks to /etc/alternatives/vim