Live data from Hacker News

Understanding the Origins and the Evolution of Vi and Vim

pikuma.com

41–50 of 128 posts

Re: Understanding the Origins and the Evolution of Vi and Vim

#41
post #6

It's incredible how good of a design Vi is. Try this experiment: Busybox includes a tiny clone of vi with a reduced feature set. It's very stripped down when compared to Vim or even other vi clones, but as a pure text editor it's still more powerful than most modern day IDEs . I love my Jetbrains IDEs, but you can take my Vim plugin from my cold dead hands :)

It is worth knowing pure vi to some extent. To the point you raise, it's pretty much guaranteed to exist on any system you're on. That's not true of anything else, even vim

Re: Understanding the Origins and the Evolution of Vi and Vim

#42
post #29

Earlier quoted context omitted.

TECO was just a DEC line editor, not entirely unlike ed/ex. The idea of TECO managing a display terminal (i.e. the environment in which emacs was written as a bunch of macros) came much later, and really only existed at MIT. Glass TTY terminals were very new in the early 70's. TECO was primarily written to the "Knight TV" system, which was a fancy MMIO framebuffer array hooked up to a PDP-10 that would multiplex a bu…

I started with TECO (Text Editor Character Oriented) on Caltech's PDP-10 back in 1975. There were no glass ttys, just DECwriters and ASR-33s (ugh). I.e. TECO was a line editor. A couple years later, ADM-3A's arrived. And so did a TECO macro that turned TECO into a screen editor! Oh, what joy! Isn't it a amazing that a macro could turn a line editor into a screen editor? I also used TECO on my H-11 PDP-11 computer.

The name I recall from using it on a PDP 11/04 was 'Text Editor and Corrector' https://en.wikipedia.org/wiki/TECO_(text_editor)

I vaguely recall it had a line-open / visual mode, like ex/vi, which we didn't use because we were on a dot-matrix line printer / teletype. The ADM-3A had the Ctrl key on the home line; this design made it easy for editors from that period (vi, emacs) to make heavy use of Ctrl.

Thanks to those who posted bits of TECO - I'd forgotten how the character movement was similar to vi. A fellow student in our CS honours year had a semester thesis project analysing the grammar of vi commands and specifying it in a formal grammar. The combination of action x movement is powerful, simple and concise.

Re: Understanding the Origins and the Evolution of Vi and Vim

#43

Earlier quoted context omitted.

I started with TECO (Text Editor Character Oriented) on Caltech's PDP-10 back in 1975. There were no glass ttys, just DECwriters and ASR-33s (ugh). I.e. TECO was a line editor. A couple years later, ADM-3A's arrived. And so did a TECO macro that turned TECO into a screen editor! Oh, what joy! Isn't it a amazing that a macro could turn a line editor into a screen editor? I also used TECO on my H-11 PDP-11 computer.

Here's that TECO macro (have fun!): [4 [5 [6 [7 [8 [9 +0U7 0,0X4 10U4 [4 ETU4 [4 EDU4 [4 EUU4 [4 ^D ET&(128#64#32#1^_)#512#16#8#2ET ED"G 0ED ' @^U5/U9 ET#1ET 27^T Q9^T ET&(1^_)ET/ @^U6/.U8 ZU4 -3U6 ^^HM5 13^T ^^KM5 10^T ^^KM5 13^T :G4 10^T 13^T :G4 Q4,ZT ' ' ' Q7-27"E ^TU7 Q7-27"E !F0! 27@I%% Q4,ZX4 ^^HM5 13^T -1U7 0; ' Q7-^^?"E ^T^[ @O!F0! ' @O!F! ' > Q4,ZK Q8J Q7/ 0,0X7 G_ ^YX8 ^YK 0,0X9 ^^HM5 13^T ^^=M5 @O!A! ' Q7…

That has a texture reminiscent of the J/k family.

Re: Understanding the Origins and the Evolution of Vi and Vim

#44
The ancestor of all those full screen terminal editors is the RAND editor, which was on Unix around 1974.[1] Few people outside the DoD research community saw it, because it wasn't free and only worked on some terminals. Functions were triggered by dedicated function keys, not key combos or a command line, and it was customary to use something with 8 to 10 function keys, such as the HP2645A. You could split the screen, edit two files, and do cut and paste. Way ahead of its time.

[1] https://www.rand.org/content/dam/rand/pubs/reports/2008/R217...

[2] https://terminals-wiki.org/wiki/index.php/HP_2645A

Re: Understanding the Origins and the Evolution of Vi and Vim

#45
post #6

It's incredible how good of a design Vi is. Try this experiment: Busybox includes a tiny clone of vi with a reduced feature set. It's very stripped down when compared to Vim or even other vi clones, but as a pure text editor it's still more powerful than most modern day IDEs . I love my Jetbrains IDEs, but you can take my Vim plugin from my cold dead hands :)

> It's incredible how good of a design Vi is.

It's interesting how this design was forced into existence by the extremely limited hardware at the time:

TFA>> It was really hard to do because you've got to remember that I was trying to make it usable over a 300 baud modem. That's also the reason you have all these funny commands. It just barely worked to use a screen editor over a modem.

That's why we got commands like d), d{, D, etc. Trying to achieve the goal in one go, without any intermediate redraws.

Re: Understanding the Origins and the Evolution of Vi and Vim

#47
post #10

Earlier quoted context omitted.

I am maybe just a year or so down from the switch from vim to neovim, but lua is a game changer. It's like, it's easy to configure stuff yourself now. Better plugins are written because the tools are better, or at least so I'm convinced. I will make a random comparison to latex vs typst (typesetting software). Both incorporate a programming environment, you can write a program right in your document. The difference i…

> ... lua is a game changer... Am I the only one who absolutely hates Lua? Its syntax, the fact that variables are global by default unless you local them, `foo = nil` isn't variable assignment but instead variable unassignment!, etc. There are far better scripting languages than Lua.

You are absolutely not. In point of fact pretty much everyone hates Lua except the handful of folks integrating it. It has a huge lead in terms of embeddability and performance vs. competitors like Python. So you see it show up in little C applications[1] again and again and again because everything else is just too much of a hassle.

But everyone agrees the programming experience in the language is awful.

[1] My son just got into RC planes, so of course I found myself looking at ExpressLRS radios and pulling EdgeTX from GitHub. It's an otherwise straightforward ESP32 board, and there in the app... yup, Lua everywhere.

Re: Understanding the Origins and the Evolution of Vi and Vim

#49
post #24

"while other editors, like Emacs, could cost hundreds of dollars." Huh? While I suppose that one "could" pay for Emacs, the vast majority of users never have. Then again, I've only been using Emacs for 45 years, so I'm a newbie. (Yes, I started with the Teco implementation.)

It's a bit dishonest imho to quote out of context. Here's the full quotation:

> Joy also claims that most of vi's popularity came from the fact that it was readily available and bundled with BSD, while other editors, like Emacs, could cost hundreds of dollars.

Joy was referring to the late 1970s early 80s here and in the context of making VI available when he created BSD and published it for free. Unix operating systems were not freely available outside academia back then.

Re: Understanding the Origins and the Evolution of Vi and Vim

#50
post #29

Earlier quoted context omitted.

TECO was just a DEC line editor, not entirely unlike ed/ex. The idea of TECO managing a display terminal (i.e. the environment in which emacs was written as a bunch of macros) came much later, and really only existed at MIT. Glass TTY terminals were very new in the early 70's. TECO was primarily written to the "Knight TV" system, which was a fancy MMIO framebuffer array hooked up to a PDP-10 that would multiplex a bu…

I started with TECO (Text Editor Character Oriented) on Caltech's PDP-10 back in 1975. There were no glass ttys, just DECwriters and ASR-33s (ugh). I.e. TECO was a line editor. A couple years later, ADM-3A's arrived. And so did a TECO macro that turned TECO into a screen editor! Oh, what joy! Isn't it a amazing that a macro could turn a line editor into a screen editor? I also used TECO on my H-11 PDP-11 computer.

We had TECO on our DEC VAXes running VMS in the early-mid 1980s. It had a ”VT52” mode (as you say, a macro), and at least one of the terminals on my desk supported those escape sequences. Wikipedia says the VT52 terminal was made from 1975 to 1978, so those macros were probably fairly early. By this stage, TECO distribution was fragmented with various incompatible versions around, so probably some lacked that macro or other full-screen macros.

Although I had a terminal which could run TECO full screen, I found that too slow and just used it in line mode. You could conveniently reprint surrounding lines by adding a few characters to the end of a commmand (I still have HT burned into my brain.) The VT52 macro had you typing commands into line 24 like an emacs minibuffer.

I never used it for all my editing, but it excelled at certain things.

The version of TECO we had was the one which shipped with VMS. At some point later on, I think, DEC stopped shipping it, and we migrated to a TECO-inspired full-screen editor developed by another university. Once that arrived, we hard-core TECO users, all 4 of us, were won over within a week.

Post reply on HN