Change default editor to VI in Debian Linux
Debian (and probably other distros) comes with NANO as it's default editor. For those VIM enthusiasts like me, there are two ways to change the editor:
1. Making use of EDITOR variable in /etc/profile:
Code:
# export EDITOR="vim"
2. Change VIM editor in Debian via "update-alternatives":
Code:
# update-alternatives --config editor
There are 3 choices for the alternative editor (providing /usr/bin/editor).
Selection Path Priority Status
------------------------------------------------------------
* 0 /bin/nano 40 auto mode
1 /bin/nano 40 manual mode
2 /usr/bin/vim.basic 30 manual mode
3 /usr/bin/vim.tiny 10 manual mode
Press enter to keep the current choice[*], or type selection number: 3
update-alternatives: using /usr/bin/vim.tiny to provide /usr/bin/editor (editor) in manual mode