crontab – Specify default editor

To change the default vim editor to emacs:

In your ~/.bashrc file, set the following:

export VISUAL=emacs
export EDITOR=emacs

You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.