12 ms·
Understanding the Origins and the Evolution of Vi and Vim
- ngcc_hk 1y agoI was surprised to see this on pikuma… I guess “ Also... Emacs sucks! ” is ok to end the blog entry. To me it is just hard to use 2-3 figures and it seemed hard for inventory as well. That sucks.
- TacticalCoder 1y ago[dead]
- gustavopezzi 1y agoAuthor here! I remember struggling with the decision of adding that last sentence or not. But at the end I was sure most readers would get that it is obviously a joke. Maybe a bad one but still a joke.
- herodoturtle 1y agoI loved the ending! Glad you kept it in. I’m sure the emacs folks will appreciate the humour in it. And they’re welcome to write their own article on the history of emacs and end it similarly. They’ve probably got a binding for it.
- neitsab 1y agoI read it as sincere, gratuitous and unfounded mud-slinging, which made me end this remarkable article on a pretty underwhelming note. We all have different senses of humor, mine would have needed some caption here :'-)
- patrickdavey 1y agoI was slightly surprised that they didn't add a mention of neovim.
- synergy20 1y agowhile neovim is great and I intend to switch even, some time down the road, it caused a not-really-compatible fork and diverted the efforts, I wish them to be merged however hard it will be.
- kzrdude 1y agoI 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 is that the tex programming environment is a bit unapproachable and not very similar to other languages you may already know, while typst's equivalent is consistent and more similar to languages you know.
- sodapopcan 1y agoVim9script is actually a great language.
- kzrdude 1y agoWell, I missed it because I seem to have departed Vim
- sodapopcan 1y agoOhhhh I misread, I thought you were saying you were a year away from switching, lol.
- behnamoh 1y ago> ... 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.
- jiehong 1y agoSide note: that ADM-3A bears such a beautiful design. I like how its curves are akin to the screen curvature.
- dingaling 1y agoA product of Lear-Siegler so it shares heritage with the Learjet family, through Bill Lear.
- PopAlongKid 1y agoI bought a used one for my use at home while working on a university degree. And as another comment noted, vi would still be usable with a 300 baud (or 1200, I can't quite remember) modem. You could limit the visible "window" into your file to five lines on screen, so it didn't take so long to refresh. Alas, no longer have the ADM3a (but my kids when younger did use it as a play typewriter for a while).
- nickandbro 1y agoVim is awesome! For my hobby project, Vimgolf.ai , I am trying to make it easier and more fun to learn vim by being gradually introduced to the different motions. I am eventually trying to create different bots to create a standard of difficulty for each level but that is TBD at the moment.
- dbdr 1y agoThat's fantastic, well done! Is the "Controlled Neovim Terminal" supposed to be some bot you are competing with? At first it confused me. Personally I think the first contact with the game would be much more intuitive without it (it can always be introduced later, e.g. if you plan competitions with other humans on randomly generated levels). There are only two levels now, right? As I equaled both top scores (possibly optimal?)... when more? ;)
- qsort 1y agoIt'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 :)
- deleted 1y ago[deleted]
- pugworthy 1y agoI 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.
- jxm262 1y agoSame 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.
- skydhash 1y agoThe 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.
- deleted 1y ago[deleted]
- agumonkey 1y agoThe history of ed, TECO and other pre live fullscreen programs is also worth reading.
- ggm 1y agoAside from neovim, no mention of nvi, Keith Bostic's fork which was BSD mainline, and the Japanese hacked on to add utf handling. The main divergence of note is tab expansion.
- bch 1y agoAnd one probably wouldn’t notice, but the buffer is backed by a “recno”[0] Berkeley DB instance[1]. [0] https://edoras.sdsu.edu/doc/BerkeleyDB/ref/am_conf/logrec.html https://edoras.sdsu.edu/doc/BerkeleyDB/ref/am_conf/logrec.ht... [1] https://en.wikipedia.org/wiki/Berkeley_DB https://en.wikipedia.org/wiki/Berkeley_DB
- ggm 1y agoIsn't that how most editors manage infinite undo/redo? I wondered if there is some magic "prune the backend and its now linear" model.
- montroser 1y agoSo interesting to see how the ADM-3A keyboard layout itself was such a fundamental influence for ESC and hjkl movement in vi.
- kps 1y agoAnd that I suspect originates with ASCII Control-H = backspace (cursor left), Control-J = line feed (cursor down). Control-K and Control-L don't match but weren't so important that they couldn't be repurposed by an early display terminal.
- sudahtigabulan 1y agoYep. It's all in the manual. https://archive.org/details/ADM-3A-User-Reference-Manual-April-1986/page/n12/mode/1up https://archive.org/details/ADM-3A-User-Reference-Manual-Apr... (This page, and Figure 1-3 below).
- anamax 1y ago"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.)
- halayli 1y agoIt'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.
- CalChris 1y agoI'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<esc> 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 sabbatical to his alma mater in 1975. Bill Joy started as a grad student at Berkeley that same year. emacs (1976) wasn't ported to Unix until the 80s. There's no hard evidence and neither Ken Thompson nor Joy has ever mentioned TECO. So I'm probably wrong. But I still consider TECO to be the ur editor.
- ajross 1y agoTECO 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 bunch of displays and keyboards. There really was no "terminal" device per se, it was all software. There were other such devices (the MIT one was actually inspired by a similar system at Stanford), but nothing compatible enough to target an editor. So basically if you were at MIT you'd understand TECO as the pinnacle of editting . But no one else could use it. By the time Joy started writing vi, the idea of a "terminal" being a serial-connected device speaking a byte protocol with a handful of reasonable operations (position cursor, clear screen, etc...) had solidified. So a portable editor that would work with multiple devices was feasible. Emacs wouldn't get that for a few years yet.
- CalChris 1y agoTECO 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 <esc><esc> 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.
- drbig 1y agoReminded me of CygnusED, which apparently has even a working website[1]. I really wish the core idea of ARexx had become popular enough. 1: http://www.cygnused.de/index-en.php http://www.cygnused.de/index-en.php
- teo_zero 1y agoThere was another editor for the Amiga, possibly only known to the users of Matt Dillon's DICE compiler, that integrated so well with ARexx that at a certain time I suspect ARexx code surpassed the core C code. The name's DME and the source is still available. I can't agree more on the beauty of a OS-endorsed scripting language embeddable in every application! Lua might take that role one day...
- YesThatTom2 1y agoCygnusED’s speed made it feel unlike any other editor. Brilliant engineering!
- jasperry 1y agoBram's first version of vim was for the Amiga! Indeed, as the article says, this deserves to be more widely known. On the other hand, an Emacs clone (MicroEmacs) actually came with my Amiga 500's bundled extras disk...
- bodyfour 1y ago> 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/commit/3e1db26a5a6252fcff0898d4cb0c3fa16ccf561d 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
- litoE 1y agoUp to now I have been using elvis exclusively, rather than vim, both on Windows and Linux - I never saw the need to switch, since elvis does everything I need. I just retired it last month, when I upgraded some systems to the latest release of Debian Bookworm and the elvis graphic interface started crashing the whole X windows manager. I have the source code, but I don't have the patience to recompile and debug it.
- ilrwbwrkhv 1y agoAs a slight aside if you want unabashed joy for 18 hours, take Pikuma's Raycasting Engine Programming course. One of the best courses I have taken and I don't do many courses because I have stuff to do. Also it's in C.
- kjellsbells 1y agoRetrocomputing spelunkers might also look at EDLIN, a line editor that shipped with MS-DOS that had a great deal of similarity to UNIX ed.
- Narishma 1y agoI think EDLIN is closer to CP/M's ED.
- Animats 1y agoThe 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/R2176.pdf https://www.rand.org/content/dam/rand/pubs/reports/2008/R217... [2] https://terminals-wiki.org/wiki/index.php/HP_2645A https://terminals-wiki.org/wiki/index.php/HP_2645A
- bakul 1y agoI used the rand editor in early 80s & loved its “infinite” quarter plane model. Dave Yost enhanced it quite a bit and called it the Grand editor. But it was hard to maintain as it relied on K&R C. Eventually I gave up and went back to vi.
- asicsp 1y agoSee also: "Where Vim Came From" https://twobithistory.org/2018/08/05/where-vim-came-from.html https://twobithistory.org/2018/08/05/where-vim-came-from.htm... Discussion: https://news.ycombinator.com/item?id=17696023 https://news.ycombinator.com/item?id=17696023 (420 points | Aug 6, 2018 | 259 comments)
- notorandit 1y agoMy first text editor has been vi on NCR Unix machines back in 1986 and DEC Ultrix in 1988. I fell so deeply in love that I joyed only when I could get a "copy" of vi.exe from MKS unix-like toolkit for DOS. That file only. Nice read, indeed. Especially the final sentence. > Also... Emacs sucks!
- bsdz 1y agoIn a, thankfully past, role working remotely for an antipodal organisation with badly configured networking; often, the lag between typing several characters on the keyboard and those characters appearing on my screen could be measured in seconds! Vi key bindings were a godsend as I could send commands (eg global search & edit etc) and be confident they were being applied before recieving a (delayed) visual update. I feel my experience seems to echo (albeit slightly) that of Bill Joy's vi development on a 300 baud modem!
- sunshine-o 1y agovi and the UNIX shell are just beautiful tools. It always amaze me that I was only introduced to them in my adult life way after Windows, but still for me they are the definition of what computer is. So this is not really about (personal) nostalgia. Also in the age of 8K screens, VR, AI and AI ready computers, a lot of people still use and love vi. Call me crazy but my guess is there might still be vi users in 50 years.
- bsenftner 1y agoHarvard University used to teach an assembly language class back in the 80's, taught on a mainframe - a VAX 11/780 or similar I seem to recall. This was an open enrollment class, available to evening and summer students. That class was, well it as Assembly, so it was difficult. The homework assignments were odd, seemingly unrelated. At the midterm, the professor handed out a makefile that combined every assignment to date, and if you did your homework correctly, a mini version of Vi was produced. The rest of the class with polishing that version of Vi, all in assembly 11/780. Taught me one hell of a lot!
- porridgeraisin 1y agoIf you can recall, what were the individual assignments? Would love to understand how the modules added up
- bsenftner 1y agoNow you've got me digging through archives, I've got all the homework assignments stored. I need to find someone with an exabyte tape reader...
- tilne 1y agoIf you do find someone I’d love to hear more as well.
- bsenftner 1y agoI found part of my homework assignments, some printouts. I'd forgotten the big reveal at the end of the class. If all the homework assignments were done correctly, a makefile given out as the class ended, "a surprise gift", turned all the homework in a subset of a C compiler. The class's TD was also very interesting. He was 13, a child prodigy in their CS PhD program. I remember when I learned his age, he told me not to tell anyone, it would impact their ability to learn from him.
- 1y ago
- amelius 1y agoDoes anyone know of a good Vim plugin for navigating Python code blocks? E.g. moving to the start/end of a block, or moving to the next block.
- teo_zero 1y agoIf I remember correctly the script runtime/ftplugin/python.vim remaps [[, [], ]], etc. to work with Python's idea of blocks. Besides, the plugin michaeljsmith/vim-indent-object defines a new text object ("i"), based on indentation levels.
- DriftRegion 1y agoMapping escape to caps-lock makes much more sense after looking at the ADM-3A keyboard layout. Cool write-up!