The solution for using vi is to use the command: sudo update-alternatives --config editor This will show the following (in 9.04 at least) from which you can change the default editor to vim:
There are 4 alternatives which provide `editor'.
Selection Alternative ----------------------------------------------- * 1 /usr/bin/vim.tiny 2 /bin/ed + 3 /bin/nano 4 /usr/bin/mcedit-debian
Press enter to keep the default[*], or type selection number:
The solution for using vi is to use the command: sudo update-alternatives --config editor
This will show the following (in 9.04 at least) from which you can change the default editor to vim:
There are 4 alternatives which provide `editor'.
Selection Alternative ------- ------- ------- ------- ------- ----- mcedit- debian
-------
* 1 /usr/bin/vim.tiny
2 /bin/ed
+ 3 /bin/nano
4 /usr/bin/
Press enter to keep the default[*], or type selection number: