Sunday, 13 April 2014

Setting Vim as default for to edit crontab on Linux or Solaris



When using crontab to edit files it can be annoying not to have your favourite text editor set. On many Linux distributions the default is nano which is not what I prefer which is vim.

To set vim as the default in the user home folder set in the .bashrc file e.g.

$ vim /home/cwishaw/.bashrc

export EDITOR='vim'

Save the file and reaload the file with

$ . ~/.bashrc

or

$ source ~/.bashrc

No comments:

Post a Comment