[TUHS] vi in cooked mode?

Larry McVoy lm at mcvoy.com
Sat Nov 5 11:02:47 AEST 2022


On Sat, Nov 05, 2022 at 11:45:26AM +1100, Dave Horsfall wrote:
> A boss of mine insisted that everyone had to learned "ed", because after a 
> system crash it might be the only editor available; that, or having to 
> dial in over a slow modem.

Same.  Though vi in ex mode was also good.

I also got a little corrupted by whatever editor came with BDS C, my 
.exrc looks like this:


map # :.,$
map @ :1,.

Those came from that editor, # says do whatever to the end of the file,
@ says do whatever from the top of the file to here.

map , !}fmt

This came from Udi Manber, , runs your paragraph through fmt

map!  

I set shiftwidth to 4 spaces because when you have code like

	if ((this big thing == that big thing) && (this other big thing) &&
	    (yet another big thing)) {

I use 4 spaces for what I call the continuation line.  I used ^A to write
that example, why I don't like ^T is lost to me.

And yeah, I paren stuff that doesn't need to have parens, it just makes
the code more obvious.

set redraw ai aw terse 

redraw I think is left over from modems, autoident because duh, 
autowrite because who doesn't hack, hack, hack, ^Z, !cc?  terse
because I'm not a newbie.

set sections=uhshSHNH
set paragraphs=PSPETSTEFSFEKSKECSCERSREDSDEIPNPLPPPTLABAIAELIB1B2HH

Troff.

set ts=8 sw=4
set shell=/bin/sh
set showmode
set textwidth=1000
set vb

Etc.

I've been carrying around that .exrc for around 40 years.  Sheesh, I'm old.


More information about the TUHS mailing list