When you create an e-mail in Mutt or edit your crontab file with crontab -e you use the default editor which is Vi. So how do you change this?
- 1 -
If you want to change the default editor for every user account, enter the following as root:
pico -w /etc/profile
(The -w is important because everything on the line that starts with export needs to be on one line.)
Or if you only want to change the default editor for your account (overrides system-wide editor), enter:
pico ~/.bash_profile
- 2 -
Somewhere before the line that begins with export, enter:
EDITOR=pico
(Or EDITOR=emacs, EDITOR=joe, EDITOR=vi etc.)
- 3 -
Add the word EDITOR to the end of the line that begins with export, and press Ctrl+o to save the file, and Ctrl+x to exit.
- 4 -
Enter:
. /etc/profile
..or:
. ~/.bash_profile
...to apply the changes.
|