On Sun, 3 Feb 2008 01:15:06 -0800 (PST)
"Binish A.R" <arbinish@yahoo.com> wrote:
> The choice of editor depends on the env variable EDITOR.
> Set the env variable to say vi, export EDITOR=vi
> and visudo would open the file in vi instead of nano
Actually, in Debian and Ubuntu the editor is set by the alternatives
system. "visudo" will use the alternative set for "editor". You can change
it using the command
sudo update-alternatives --config editor
The EDITOR and VISUAL environment variables are not set by default. You can
confirm this by typing
echo $EDITOR
echo $VISUAL
Having said that, it certainly will also work to do,for example
export EDITOR=vi ; visudo
( or indeed export VISUAL=vi )
By default, if you type "editor" you will get whatever is set by the
alternatives system - normally nano, unless for example you have installed
"mc", in which case you get "mcedit" unless you change it with
update-alternatives. All this depends on the priority set - see
sudo update-alternatives -display editor
Peter
--
"INX Is Not X" Live CD based on Ubuntu 7.04 : http://inx.maincontent.net
Screenshots slideshow: http://inx.maincontent.net/album/1.png.html
--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users