In my college our Admin has replaced vi by vim.
So how do I replace vi by vim so that, when I type vi in terminal, then vim should get opened.
I know doing so is silly, but I am asking it just out of curiosity.
You can add
to .bashrc . This will start vim whenever you type
Note that in Ubuntu 10.10 (and I think also 10.04) vi is already mapped to vim.
(I btw think it's not silly. It saves typing ;) )
'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:
If you want it to use another version of vim, then make sure it's installed and run:
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.
or create a symlink to vim
However on my system both /usr/bin/vim and /usr/bin/vi are symlinks to /etc/alternatives/vim