nmh-workers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [nmh-workers] Unnecessary dependency on vi???


From: Paul Fox
Subject: Re: [nmh-workers] Unnecessary dependency on vi???
Date: Mon, 19 Mar 2018 18:12:30 -0400

ken wrote:
 > > > So since you were there ... I never did understand the point (or the
 > > > distinction) between VISUAL and EDITOR.  More specifically, I never
 > > > understood when you were supposed to use one versus the other.
 > >
 > >i can answer that one.
 > >
 > >in the bad old days, if you were working on a slow dialup (300 or
 > >1200 baud), or, actually, a printing terminal at any speed, you'd
 > >probably want to invoke ed or ex.  if you were working on a
 > >"high-speed" 9600 baud terminal, you'd likely want vi or emacs etc. 
 > >so a program like mail would offer two escapes (~e vs.  ~v) to let yo
 > >invoke either.
 > 
 > So ... I guess programs would look at the terminal and if your speed was
 > 9600 baud or greater, you'd use VISUAL, and if it was slower you'd use
 > EDITOR?  I could believe that (although from memory I don't recall vi
 > being that bad at 2400 baud, but it was a while ago!).

I suppose that might have been done, but I don't recall programs
making the choice by themselves.  It was more along the lines of the
mail(1) feature, where the user could decide on the fly to choose
"terse line oriented" (via EDITOR) or "feature-rich screen oriented"
(via VISUAL).  I don't recall any other examples of programs offering
that sort of choice at the moment.  (Nor will I probably for the
foreseeable future -- it was a while ago.  :-)

You're right about vi not being too bad at slower rates, and there was
a huge amount of optimization in the code to make it all feasible.  As
example, the ADM-3A (on which Bill Joy developed vi) lacked a 'delete
line' screen manipulation command.  So when vi deleted a line, it
would do a "clear to EOL", and then put insert an '@' sign at the
front of the resulting blank line, to indicate to the user that the
line didn't really exist in the edit buffer.  This saved adjusting the
rest of the lines.  If you deleted a bunch of lines, you'd end up with
a bunch of empty space on the screen.  Refreshes were expensive, so
there were two different "refresh the screen" commands:  ^L, which
would do a full redraw, and ^R, which would only redraw from the first
deleted line down, thereby saving the time of redrawing anything from
that point up.

(I still remember my sense of wonder when I saw an ADM-3A running vi
at Bell Labs, at a whopping 9600 baud, when I arrived there in 1980. 
I knew about tty-like terminals, and I knew about graphics, but it had
never occurred to me that you could do that kind of editing with a
text-based terminal.  Hey, I was young...)

paul
=----------------------
paul fox, address@hidden (arlington, ma, where it's 32.5 degrees)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]