Gentoo Wiki ArchivesGentoo Wiki

Changing_the_default_editor

This article is part of the Tips & Tricks series.
Terminals / Shells Network X Window System Portage System Filesystems Kernel Other

The default editor in Gentoo is used by various console applications which initiate editing of config files (crontab) or require input that it too complicated to enter on the command line (svn). Initially, the default editor is set to Nano.

Global setting

To change this setting system wide, change the EDITOR variable in /etc/rc.conf to the editor you wish to use. For example:

File: /etc/rc.conf
 # Set EDITOR to your preferred editor.
 #EDITOR="/usr/bin/nano"
 #EDITOR="/usr/bin/emacs"
 #EDITOR="/usr/bin/vim"
 EDITOR="/usr/bin/mcedit"

Per-user setting

Use

export EDITOR=/usr/bin/emacs

to change the editor only for the current session, or

echo -e "export EDITOR=/usr/bin/emacs" >> ~/.profile

to change it permanently.

Retrieved from "http://www.gentoo-wiki.info/Changing_the_default_editor"

Last modified: Thu, 04 Sep 2008 13:58:00 +1000 Hits: 13,616

Created by NickStallman.net, Luxury Homes Australia
Real estate agents should be using interactive floor plans and real estate agent tools.