How modal editing and vi originated and why this is a unique design choice tied to specific circumstances.
https://buttondown.com/hillelwayne/archive/modal-editing-is-a-weird-historical-contingency
Post
How modal editing and vi originated and why this is a unique design choice tied to specific circumstances.
https://buttondown.com/hillelwayne/archive/modal-editing-is-a-weird-historical-contingency
@amoroso
I don't see it as modes... The i command is just a very long command that ends with escape. Just like in ed where it is a multiline command that ends with . alone on a line.
And if you keep insisting, then Emacs does have modes. After a ^X for example all keys suddenly mean a different thing.
Interesting idea.
In the late 1970s I worked on a shop that used data general novas and the editor was nspeed, a workalike of teco, on upper case only adm 3a's. Teco/nspeed and I'm sure many others are glorified paper tape editors; yank a line, edit in place, punch out, repeat.
Not many years later I switched to WordStar in non document mode but quickly switched to PMATE/MATE which today you'd call a vi clone. Screen oriented, but started in "command mode", top line where you enter commands that operate on the text below, and in the file; it retained yank/punch paradigm as does vi, though like vi by this time there was enough memory that yanks and punches were automated, essentially.
Mate (Mike Aronsons text editor) is probably a few years after vi. I knew Mike but never talked to him about the origins of Pmate. (Phoenix Software sold it. They prefixed all their code with p).
As it happens I have been using Pmate again after 40 something years, building an MP/M machine. It's so like vi in structure it's maddening to switch between.
But to me, it seems like vi's modality is borrowed from those earlier paper tape editors. The oldest one I used was on a Varian 622/I I personally owned, ran it with an ASR 33 and edited text, for parts, as even circa 1977 it was alien even to the engineers (I was 18 to 20). Editing involved halting, and pressing of front panel switches.... But it yanked literally a line from tape, you'd edit with the space bar to move "cursor" etc, the punch, literally, that line on the paper tape punch. Needless tocsay I did not do much of this.
But that paradigm is very old. Nspeed and presumably teco could have macros like we used that would put lines before and after the line of text being edited onto the adm 3 (burned into my brain: control-bB$$) after commands -- no so far from :., $s/expression/ on the bottom line of vi or the top line of Pmate.
@tomjennings Fascinating precursors, thanks.
@amoroso I'm a vi die hard although sitting here with broken fingers trying to edit files made me realize it actually sucks (for accessibility)
@amoroso I can't speak for others, but for me the reason I switched to vi was because it only required me to locate one special key (Esc or whatever equivalent there was).
This was in the early 1990s, and I happened to be using a mix of different *nix computers and terminals. At that time, keyboard layouts were ... not standard.
So, having to only locate one special key was very helpful.
@isaackuo As for me I got started by using vi just as one of a number of editors.
@amoroso
I was stopped in the first paragraph, where a couple of irreplaceable male artists are contrasted with the purely standard product a female one is... 🙄
It may not be intentional–would it be any better for that?
@amoroso
Since you don't follow me, you're unaware that I was vi user #1. I (and a few fellow students) beta tested vi for Bill Joy.
Given that, I don't have to guess:
> Bill Joy probably took the idea because he was working on dumb terminals that were slow to register keystrokes, which put pressure to minimize the number needed for complex operations.
He's guessing, and he guessed wrong. That's simply incorrect. They were *not* too slow in their original 9600 baud environment, which is obvious if you think about it: in insert mode, characters are inserted instantly, which required the the following characters on the line to be shifted rightwards instantly.
However he also optimized it for the really slow 300 baud users, where he might have been right, but no, it was still modal and it just delayed the slowest screen updates until the e.g. insertion was finished.
It's ambiguous when he said:
> It seems to me that modes started as an unsuccessful experiment deal with a specific constraint
If he means the lack of extra keys, due to the lack of the MIT/Stanford super and meta control keys, then perhaps. If he means the slow terminals, then we see that his thesis was simply wrong guesswork.
The overall comment on modal editing being rare is interesting. I'd like to see a more thorough and careful research on that.
@dougmerritt Very interesting, thanks for clarifying the historical record.
@amoroso @dougmerritt I used it a lot in the 80s and 90s, without a mouse, and from memory it was generally quicker and more accurate to say what you were changing (the next word or the rest of the line) and just type the new stuff, as opposed to deleting the old stuff and typing the new.
It's fewer keystrokes, compared to using arrow and delete keys, and you don't have to look to know you have deleted the right amount.
It certainly felt helpful on a slow connection.
@jarkman I never used vi on slow connections but it still made for efficient text manipulation for the reasons you mention.
@amoroso @jarkman
Agreed. That's the efficient way to do it even today (in vi/vim/etc).
P.S. back in that day I had to do some work over an *especially* slow link (150 baud -- you could see each character appear on the terminal) and was astonished to see that Bill had optimized for *that*, too. It delayed just about everything it could for as long as it could.
@amoroso @dougmerritt I do think it's a bit weird to argue that the circumstances that made it good (no mouse, slow computers or connections, lots of use of cursor keys and autorepeat) were weird or particular. Computers were just like that then.
A space for Bonfire maintainers and contributors to communicate