Set default editor on Debian

Debian Linux

To change the default editor at the system level:

sudo update-alternatives --config editor

and then follow the onscreen prompts.

If your editor isn’t on the list, do this first:

update-alternatives --install /usr/bin/editor editor /usr/bin/vim 10