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