Linux Mall - The Linux SuperStore!
Linux books, Linux CDs, Linux toys, you name it, they have it!

W W W . L I N U X D O T . O R G

Newbie's Linux Manual
Changing Your Default Editor
] [ Download*] [ Previous] [ Next] Home] [ Contents] [ Download*] [ Previous] [ Next] Homepage| The Last 5 Days| The Daily Linux News| The Linux Bits| Newbie's Linux Manual
The Best Linux Sites| Linux Book Reviews| A Windows Vendetta?
Diary of a Linux Newbie| Diary of an Open Source Newbie
The Linux Forum| Just For Fun Amazon - The World's Biggest Bookstore!
4.7 million books, CDs, videos, and DVDs available to buy! Webmaster| Manual's Copyright Terms
[
* In Linux enter: unzip nlm.zip
The Vi Revolt

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.

[
* In Linux enter: unzip nlm.zip
© MM Linuxdot.org |