From owner-freebsd-questions Wed May 8 6:45:34 2002 Delivered-To: freebsd-questions@freebsd.org Received: from cactus.fi.uba.ar (cactus.fi.uba.ar [157.92.49.108]) by hub.freebsd.org (Postfix) with ESMTP id 0F5B637B40D for ; Wed, 8 May 2002 06:45:26 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by cactus.fi.uba.ar (8.11.6/8.11.6) with ESMTP id g48DgHO35136; Wed, 8 May 2002 10:42:17 -0300 (ART) (envelope-from fgleiser@cactus.fi.uba.ar) Date: Wed, 8 May 2002 10:42:16 -0300 (ART) From: Fernando Gleiser X-X-Sender: To: Ross Lippert Cc: Subject: Re: an editor in /bin In-Reply-To: <200205081326.GAA02899@eskimo.com> Message-ID: <20020508102907.K32808-100000@localhost> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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