Crontab - how to change the editor
Been playing with crontabs (sort of) and wanted to change the editor of the crontab file, easy! :)
VISUAL="nano" crontab -e
The important part being the VISUAL="nano" ;) which uses the editor nano - which I found to be easier to use than VI
Comments
- Predominantly and conventionally the EDITOR environment variable is used for this. If you check things like ~/.bashrc, ~/.bash_profile, ~/.profile, ~/.cshrc you will probably find something like EDITOR vi in them. A large number of command line tools will use the EDITOR environment variable to decide what editor to load up. For example on a Mac if you wanted to do everything in say TextMate you could do EDITOR="mate -w" - Geoff on Thu Aug 21 2008 10:17:56 GMT+0000 (Coordinated Universal Time)
- Thanks Geffy :) - matt on Thu Aug 21 2008 10:46:09 GMT+0000 (Coordinated Universal Time)