Problem
You would like to change the default editor for crontab from nano to vim.
Solution
Add the following to the ~/.selected_editor:
1 |
SELECTED_EDITOR="/usr/bin/vim" |
or run the select-editor and choose vim-basic (4)
1 2 3 4 5 6 7 8 9 10 |
server# select-editor Select an editor. To change later, run 'select-editor'. 1. /bin/ed 2. /bin/nano <---- easiest 3. /usr/bin/mcedit 4. /usr/bin/vim.basic 5. /usr/bin/vim.tiny Choose 1-5 [2]: 4 |