How To: Change Crontab Editor in macOS
my crontab in nano editor on macOS
macOS uses nano editor for crontab updates lately, which is not the text editor I particularly like.
With this in mind, I decided to change it. Usually it’s enough to just set the EDITOR variable to something like vim
EDITOR=vim crontab -e
or, even better:
export EDITOR=vim
crontab -e
But this no longer does the trick!
Turns out, you need to set VISUAL variable instead:
export VISUAL=vim
crontab -e
… and see how imediately better (and much more familiar to me) the experience looks:
my crontab in vim editor on macOS
See Also
- macOS
- macOS commands
- Manage settings with dotfiles
- brew command not found - use brew for installing software
- Unix/Linux Software
my crontab in nano editor on macOS
macOS uses nano editor for crontab updates lately, which is not the text editor I particularly like.
With this in mind, I decided to change it. Usually it’s enough to just set the EDITOR variable to something like vim
EDITOR=vim crontab -e
or, even better:
export EDITOR=vim
crontab -e
But this no longer does the trick!
Turns out, you need to set VISUAL variable instead:
export VISUAL=vim
crontab -e
… and see how imediately better (and much more familiar to me) the experience looks:
my crontab in vim editor on macOS
See Also
- macOS
- macOS commands
- Manage settings with dotfiles
- brew command not found - use brew for installing software
- Unix/Linux Software