I’ve been a fan of Ubuntu Linux since I first started using it a few years ago. One of the first things I do when building a new Ubuntu machine is set the default editor to Vim. I have been using Vi for a long time and the keyboard shortcuts are very natural for me, so the first time I typed a command like visudo or crontab -e and got the Nano editor, I was shocked. With Ubuntu 8.04 it’s really very easy:
Open a terminal window (Applications/Accessories/Terminal) Type: sudo apt-get install vim-full
That should do it. By default only the vim.tiny package is installed and installing the vim package (apt-get install vim) only gets you vim.basic. Both of those will leave the default editor as Nano. Installing the vim-full package will take care of modifying the default editor for you to be vim.gnome. If you would like to change the setting to something else, or that didn’t work with the version of Debian or Ubuntu that you have, try:
sudo /usr/sbin/update-alternatives --config editor
Then pick the number that corresponds with your choice.