Every time I install Ubuntu I end up struggling with changing the default editor to use vi or vim.
If only I’d found this page before!
So simple!
All you have to do is run (as root):
update-alternatives --config editor
Mar 15
Setting vim to be the default editor
by Michele in Linux, Techie :: Techno ::, Ubuntu

From Donncha O Caoimh:
Thanks for posting Michele – I just reinstalled and checking stuff into svn and it brought up Nano. *shudder* The horror of it!
From michele:
Donncha
Until I found this tip I kept having to edit each user profile manually – it was wrecking my head!
From paul:
I’ve never really gotten a handle on Vi/Vim or the alternative ones. I’ve been sticking to plain old pico, or when needed xemacs.
Can anyone recommend a good Vi intro sheet ?
From michele:
Paul
Search my archives – you might find something useful!
Pico is so .. I’m trying to find a word …