nanosudo? (default update-alternatives --config editor choice)
Paul Sladen
ubuntu at paul.sladen.org
Mon Dec 24 07:30:53 UTC 2012
On Sun, 23 Dec 2012, Phil Dobbin wrote:
> On 12/23/2012 09:55 PM, Paul Sladen wrote:
> > On Sun, 23 Dec 2012, Phil Dobbin wrote:
> > > 12.04 ... when I ran the visudo command, it plonked me into nano.
> > Which editor would you prefer Ubuntu to default to?
> Well, the clue is in the name: visudo. vi
I think there's a selection of Unix commands (crontab -e, visudo, ...)
which cause a text-editor to be loaded with a pre-selected file.
In which case, perhaps some options are:
a. Hard code 'visudo' to be non-standard (not use $EDITOR)
b. Change the system-wide $EDITOR default to be 'vim'
c. Something else (please specify)
> > Can you list the advantages and distadvantages (pros/cons)
In order to have a discussion about changing the default value of
$EDITOR, it's necessary to enumerate the pros and cons. Would you be
able to help by working through and listing all the positives and
negatives or each possibility; and even any other possibilities you
can think of.
I'd certainly agree that historically the 'vi' in 'visudo' was 'vi'.
On Sun, 23 Dec 2012, Felix Miata wrote:
> Many will never get anything useful done in vi(m), or even figure
> out how to exit it except by kill or CAD.
I believe one of the reasons why Nano is set as the initial boot
default $EDITOR on Ubuntu installs is to cope with this reaction from
first-time, or new users. That's not to say the choice is correct, or
unchangable. The general argument, is that power-users, such as
yourself Phil, are capable and able to search Google, and/or read
documentation and from that run a command such as:
sudo update-alternatives --config editor
...Whereas a first-time Ubuntu user is in less of a position to find
this. They might even get stuck in a loop where even if they wanted
to search the web, they might not be able to if they cannot configure
the network if they are unfamiliar with the $EDITOR presented.
-Paul
More information about the ubuntu-users
mailing list