Subject: Re: RFC simple screen editor for NetBSD
To: None <>
From: Greg A. Woods <>
List: current-users
Date: 01/10/2000 00:23:08
[ On Saturday, January 8, 2000 at 15:06:27 (-0500), der Mouse wrote: ]
> Subject: Re: RFC simple screen editor for NetBSD
> [ On Saturday, January 8, 2000 at 09:31:02 (-0600), Richard Rauch wrote: ]
> > 
> > Wait, did I mention ed?
> > 
> > Yes.  ed.  It's not glitzy.  It feels a little primitive, BUT: It's
> > quite simple to learn how to use;
> Only if you already know regexps.  Otherwise the s command will act in
> various surprising ways when you happen to unwittingly use a regexp
> character in it.  Perhaps ed needs a way to disable regexps.

I was certainly waiting for someone to mention 'ed'!  :-)

I agree that 'ed' should have some alternate substitute command, or a
flag for the 's' command, that didn't parse regular expressions.  I seem
to have a memory of an ed-like editor that had this capability.  Perhaps
it was 'fred', the first full-screen editor I used on Unix (V7).  It was
basically 'ed' with a full-screen front-end reminiscent of BASIC editors
of the day.  I've no idea where 'fred, the FRiendly EDitor' came from....

Going back to an earlier part of this thread referring to the various
attributes of people who simply need to use Unix vs. those trying to
learn to use Unix I'd like to mention that almost every time I've given
advice to anyone wanting to really learn Unix I tell them to use 'ed',
and only 'ed', for the first month or so.  One could recant a bit an let
them use 'ex' I suppose, but I don't think you can get the right feel
for Unix unless you really understand 'ed'.  These days it's pretty hard
to get people to use a line editor, especially when there are still some
who remember the atrocity of EDLIN on M$-DOS.  However some people I've
helped through this process have been rather stunned to find out just
how powerful but easy to use 'ed' is.

Of course I might just be like one of those parents (though I'm not a
parent in real life, yet! :-) who says things like "When I was your age
I had to walk five miles in snow ten feet deep to get to school!" (which
my dad did/does say, and which is essentially true).  Perhaps if I'd
learned Unix exclusively on a "Glasstty(tm)", or even a DECwriter-III,
or worse an ASR-33, I'd be saying things like "You can't learn Unix
unless you learn it on a printing terminal!"

The problem with 'vi' (or emacs) is that many of the people I know who
use it are not using it any more intelligently than M$ Notepad.  *I*
still learn new things about 'vi' almost every time I use it (which I
guess isn't too surprising since I'm an emacs user, but I've been using
'vi' for at least twelve years too).  Many even expert Unix users I've
known didn't even know 'vi' had a command mode (they didn't seem to
realise that ":w filename" was an escape to command mode and that 'w'
was actually only one of many very powerful commands).  However all Unix
users I've known who started by first learning 'ed' still do the most
sophisticated things with the command-line mode.

So, in the end I think NetBSD should allow only two choices during
install whenever something needs editing: 'ed' or 'vi'

Or maybe 'sam'....  :-)  It's about the smallest yet most capable editor
I know of:

	19:49 [1337] $ uname -m
	19:49 [1338] $ size /usr/pkg/bin/sam
	text    data    bss     dec     hex     filename
	65504   4096    50624   120224  1d5a0   /usr/pkg/bin/sam
	19:49 [1339] $ ldd /usr/pkg/bin/sam
	        -lc.12 => /usr/lib/ (0x40029000)

Too bad it more or less needs X11 (or a DMD! :-) and a mouse.

There are other perhaps even more powerful line-oriented editors out
there too, and perhaps one of them would be interesting to consider,
such as a 'qed' clone [not the TRS-80 one, nor the PalmPilot QED DOC
one!] (if indeed we can't get the code to one of the originals freed by
now -- I have a version that came originally from Caltech, but I don't
think it's freely redistributable).

							Greg A. Woods

+1 416 218-0098      VE3TCP      <>      <robohack!woods>
Planix, Inc. <>; Secrets of the Weird <>