Live data from Hacker News

Understanding the Origins and the Evolution of Vi and Vim

pikuma.com

31–40 of 128 posts

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

#31
> The creator of MINIX, Andrew Tanenbaum, asked the community to choose between Stevie and Elvis to be adopted as the main text editor for their OS. Elvis was chosen and it's the default text editor on MINIX until today.

Point of order: Minix switched to BSD nvi in 2013 https://github.com/Stichting-MINIX-Research-Foundation/minix...

Not that it matters -- Minix itself hasn't had a commit since 2018 -- but the last five years of its life were spent without Elvis

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

#32
post #29

I've always considered TECO as the ur editor. Of course, TECO is the explicit ancestor of emacs, as emacs was originally implemented as TECO macros. However, I can't find a paper trail giving similar credit to TECO for vi. That said, istuff is the same in TECO as it is in vi and TECO (1963) well predated vi (1976). RSTS (along with TECO) was used at Berkeley in 1974 before v6 Unix was installed by Ken Thompson on a s…

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…

TECO was a character-oriented editor. Also, it was widely available on RSTS, RSX, RT-11, ... and other DEC systems in the mid-70s. There's a character cursor. So if you opened a file with:

  The quick brown fox jumped over the lazy.
The cursor would start before the T. 4C would position the cursor before the q. The 6D would delete quick . Then would execute the command buffer.

These fingers of mine learned TECO before they learned vi and then found vi easier to learn as a result. Besides the basic editing syntax, it was a programmable editor, hence the TECO emacs macros.

Funny thing is that as fondly as I remember TECO, I've tried emacs a few times and have always worked my way back to vi/vim. I particularly like neovim now. I like using ex/command mode for doing bulk editing. Of course you can do the same thing in emacs but I've gotten used to it in vi. I remember programming TECO but I don't remember ever doing programmed editing.

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

#33
post #26

Earlier quoted context omitted.

I have used VI for many, many years and honestly use perhaps 25% at best of its abilities. But still I get comments about how fast and smoothly I can use it from other developers. Which I think speaks to how powerful even the basic editor can be. And yes, you can also take my VIM plugin (for Visual Studio) from my cold dead hands.

Same here. Tbh, you're comment just inspired to do a deep dive on VI. Wonder how much more productivity I can squeeze out if I spend an weekend focused on it.

The productivity comes from not having to think about your editing while simultaneously realizing that you can do some complex editing really easily. I use Emacs and Vim both (I prefer Emacs) and It's quite nice when you can streamline some quick code edits.

My latest experience with Vim was helping a friend fixing some import with a React Native project. A quick grep on one terminal (I could have used quickfix) and using the vim fzf plugin to quickly locate the file. VS Code could have done this but the context switching and UI clutter is not great there.

As for emacs, the main advantages lies in the fact that so many great tools already exist there. Things like Occur, Shell Mode and Compilation Mode (relying on Comint, a more general feature for anything REPL), Project, Eglot, and Magit.

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

#34
post #29

I've always considered TECO as the ur editor. Of course, TECO is the explicit ancestor of emacs, as emacs was originally implemented as TECO macros. However, I can't find a paper trail giving similar credit to TECO for vi. That said, istuff is the same in TECO as it is in vi and TECO (1963) well predated vi (1976). RSTS (along with TECO) was used at Berkeley in 1974 before v6 Unix was installed by Ken Thompson on a s…

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.

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

#35
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.

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-^^8"E Q5P @O!A! '
      Q7-^^9"E Q5-1"E ^TU5 ' Q5@I%% @O!A! '
      Q7-045"E @^U4%Search: % M6"F @O!A! ' G4 ^Y-2X8 ^YK @O!S! '
      Q7-^^."E 0U6 !S! Q5:@S%^EQ8%^[ Q6"N Q6^W ' @O!A! '
      @O!A!
     '
     Q7"D 0U5  ' @O!V! '
     0U8
     Q7-^^A"E -1U8 '
     Q7-^^B"E 1U8 '
     Q8"N Q5*Q8U5 Q6"E 0U7 .U8 0L
      Q8-.%6 '
      Q5L -Q6U9 0U7 Q6
      0U4 @O!B! '
     Q7-^^Q"E @^U4%Command: % M6"F @O!A! ' G4 ^YX9 ^YK @O!C! '
     Q7-27"E 0U6 !C! ]4 Q4EU ]4 Q4ED ]4 Q4ET ]4 Q4-10"N ^O ' M9
      10U4 [4 ETU4 [4 EDU4 [4 EUU4 [4
      ^D ET&(128#64#32#1^_)#512#16#8#2ET ED"G 0ED ' -1EU
      Q6"N Q6^W ' @O!A! '
     Q7-^^R"E G7 @O!A! '
     Q7-^^P"E Q4"E .+1U4 ' Q5L Q4-1,.X7 Q4-1,.K G7 0U6 @O!B! '
    >
    ET#16ET ^^>M5 ^^YM5 23+32^T 0+32^T ^^KM5 13^T
    !Z! ]4 Q4EU ]4 Q4ED ]4 Q4ET ]4 Q4-10"N ^O ' ]9 ]8 ]7 ]6 ]5 ]4
    
Obviously, the TECO programming language was a challenge to understand. Mitigating this is it needed to be extremely compact, as it was used on a 64Kb PDP-11.

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

#36
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.

At the time, I was told that a student once claimed that TECO was a complete programming language. He was challenged to write a FORTRAN compiler in TECO, and did.

I'm not sure if that was true.

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

#37
post #29

I've always considered TECO as the ur editor. Of course, TECO is the explicit ancestor of emacs, as emacs was originally implemented as TECO macros. However, I can't find a paper trail giving similar credit to TECO for vi. That said, istuff is the same in TECO as it is in vi and TECO (1963) well predated vi (1976). RSTS (along with TECO) was used at Berkeley in 1974 before v6 Unix was installed by Ken Thompson on a s…

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 was a TECO user on RSX-11M, then switched to FINE (Fine Is Not EMACS :-)) on Top 10 & 20. When I started at Sun I started using vi but on the Amiga I continued to use MicroEMACS which felt a bit like FINE[1]. After Sun I pretty much stuck to vi because it was so much faster over a remote X11 connection than EMACS was.

Also used PFE32 for a while on the Amiga, sad that the source for that never made it out.

[1] I still have Craig Finseth's thesis "A Cookbook for an Emacs" which talks about designing FINE.

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

#39
post #26

Earlier quoted context omitted.

Same here. Tbh, you're comment just inspired to do a deep dive on VI. Wonder how much more productivity I can squeeze out if I spend an weekend focused on it.

The productivity comes from not having to think about your editing while simultaneously realizing that you can do some complex editing really easily. I use Emacs and Vim both (I prefer Emacs) and It's quite nice when you can streamline some quick code edits. My latest experience with Vim was helping a friend fixing some import with a React Native project. A quick grep on one terminal (I could have used quickfix) and…

[deleted]
Post reply on HN