Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 May 2002 10:42:16 -0300 (ART)
From:      Fernando Gleiser <fgleiser@cactus.fi.uba.ar>
To:        Ross Lippert <ripper@eskimo.com>
Cc:        <freebsd-questions@FreeBSD.ORG>
Subject:   Re: an editor in /bin
Message-ID:  <20020508102907.K32808-100000@localhost>
In-Reply-To: <200205081326.GAA02899@eskimo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 8 May 2002, Ross Lippert wrote:

>
> One of the shocks I had when booting in single-user mode to
> fix something was the lack of an editor in /bin other than
> ed.  I guess my questions are:
>
> 1) is there a better editor in /bin than ed?
>
> 2) (if yes) shouldn't there be a better editor in /bin than ed?
> FreeBSD was a major impetus for me to learn vi (pretty much bc emacs
> is a port).  I don't see myself learning something more spartan than
> vi, but maybe there is some value someone can point out using ed.
>
> 3) (if yes) should that editor be vi or ee?

There is a problem: in single user mode, /usr may not be mounted. If /usr
is not mounted the terminfo database is not available and any curses-based
aplication (such like vi or ee) can't work properly.
That's why in /bin you have ed which is a line editor and not a full screen
one.

If you are lucky and /usr is fine, you can mount it and use your editor of
choice.




> One piece of good user-friendliness which has happened recently in
> freebsd is the use of ee as the default editor in sysinstall instead
> of vi.  This has been very helpful for newbies.  I can attest to
> sitting over the shoulder of one newbie who has gone on to learn vi,
> but would have freaked out if her first taste of it was during the
> install.  She got through ee just fine.  I'd really like to see ee
> used as the default editor in vipw as well, for the sake of
> consistency (eepw, anyone?).
>

You already have it: =0)

EDITOR=ee; export EDITOR; vipw

> On the other hand, vi needs to be learned for certain tasks like vipw
> and visudo (assuming ee versions of these gadgets can't easily be
> made), so vi is here to stay, and perhaps anyone who can't use vi has
> no business booting freeBSD into single-user mode.

See above: if you can mount /usr and set the EDITOR env variable, you
can use ee for vipw in single user mode.

That said, I think that once you ge used to it you'll find vi a very
powerfull editor. You can install vim (vi improved) from the ports. It comes
with very extensive documentation and a tutor for learning vi (vimtutor).


			Fer
>
> space considerations:
> vi is 304k, ee is 54k, ed is 138k
>
>
> -r
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
>


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020508102907.K32808-100000>