On this page
Debian: Changing Default Tools (e.g., Editor)
A nice command exists in Debian to modify your preferences. To change the default editor, for example, do this:
update-alternatives --config editor
Otherwise, manually, you can do this:
export EDITOR=vim
visudo
Last updated 28 Nov 2006, 07:50 +0200.