The default crontab editor used by Debian systems is nano, which is inconvenient to use. How can we switch between them?
Root @ debian :~ # Update-alternatives -- config editor
There are 8 choices for the alternative editor (providing/usr/bin/editor ).
Selection Path Priority Status
------------------------------------------------------------
0/usr/bin/joe 70 auto mode
* 1/bin/nano 40 manual mode
2/usr/bin/jmacs 50 manual mode
3/usr/bin/joe 70 manual mode
4/usr/bin/jpico 50 manual mode
5/usr/bin/jstar 50 manual mode
6/usr/bin/rjoe 25 manual mode
7/usr/bin/vim. basic 30 manual mode
8/usr/bin/vim. tiny 10 manual mode
Press enter to keep the current choice [*], or type selection number: 8
Update-alternatives: using/usr/bin/vim. tiny to provide/usr/bin/editor (editor) in manual mode.
After entering the command, you will be prompted to select it. Select it based on your preferences. Here I select the VI editor and enter 8.
Now the crontab editor is changed to VI.
If the switchover is not successful, restart the service manually:/etc/init. d/cron restart.
Build a Vim Development Environment on CentOS 6.2
Vim 7.4a released, a new and faster Regular Expression Engine
Install the highlighted Vim editing tool in CentOS 5.4
Vim tips: C language settings
Set the Vim row number in Ubuntu