Crontab - how to change the editor

Posted: Thu 21st Aug 2008@09:44

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


Last edited: Thu 21st Aug 2008@09:46

Actions: Trackbacks Disabled, Permalink,

Comments

Geoff said:

21 Aug 2008 @ 10:17

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"

matt said:

21 Aug 2008 @ 10:46

Thanks Geffy :)

Name
Email
Link (Supports Pavatar)
Comment

To verify you are not a retarded spambotting fool of a took, enter the following text:

sonovagun