Subject: Re: backspace problem when using vi
To: Andy R <email@example.com>
From: Ed Gould <firstname.lastname@example.org>
Date: 03/20/2002 17:42:08
> A little history on vi (and vi historians can correct
> me here), the intent was that the command interface
> needed to use keys that existed on every keyboard. All
> the letters are obviously there. By not using
> backspace or delete or any of the other stuff you
> don't find on every keyboard (we are pre-dating the PC
> era here). That way, problems like you mention
> wouldn't happen. =
Sort of, but that wasn't the motivation, exactly. Vi was first written =
for the ADM-3A "dumb" terminal. The arrow symbols on that terminal =
were on the fronts of the HJKL keys, accessed via a special shift key. =
But the author of vi didn't like using the special shift, so he made =
the letters act for the arrows in command mode.
> However, later versions of vi incorporated more keys
> so they work if your mapping is right. If it's wrong,
> just fall back on the way vi was "meant" to be used!
In insert mode, vi always obeyed whatever character was designated as =
"erase." Typically, that was ^H, but many people used ^?. This did =
not carry over to command mode.
Support for terminals other than the 3A came a little later, with the =
advent of termcap. If I remember correctly, termcap was already in use =
when the first outside release of vi was made, with 2BSD (1BSD was just =
the Pascal system; 2BSD included Pascal and other userland tools - I =
don't recall if it included a kernel or not; 3BSD was the first =
complete Unix system BSD release, it was for the PDP-11; 4BSD was a =
complete system release for the VAX, and eventually other virtual =
memory machines. At the beginning, all of them - with the possible =
exception of 1BSD - required a Unix source license from AT&T).