There are a number of apps in Debian based distro's that use a distro specific text editor for editing their config files. An example would be Crontab, in which you can edit your own cronjobs. By default the editor you're using is Nano. However, when you're using Vi for everything except cronjobs it's not really that ideal.


These kinds of tweakers are relatively simple with the update-alternatives command. Open up a terminal and type in the following:

sudo update-alternatives --config editor

After that you'll see a list of editors you can use when apps themselves open editors, you can set them as the default for everything in the system. For example, I get the following:

tim@bytemods:~$ sudo update-alternatives --config editor


There are 3 alternatives which provide `editor`.


Selection Alternative

-----------------------------------------------

1 /bin/ed

*+ 2 /bin/nano

3 /usr/bin/vim.basic


Press enter to keep the default[*], or type selection number:

Changing the editor is as simple as entering the number of the editor and pressing enter. You can test it by using the following command:

crontab -e

You'll see right away which editor is used.




React on this article







Enter the code here: