How to make vim the default editor instead of nano on a debian system ?

Here is the debian way to make this change without breaking the system (option 4):

sudo update-alternatives --config editor