Lunduke
News • Science & Tech
The True History of vi (and vim)
How a broken pascal compiler, a 300 baud modem, and a 1970s terminal helped create the (in)famous text editor.
August 08, 2023
post photo preview

Earlier this week (August 3rd, 2023), Bram Moolenaar, creator and long-time maintainer of Vim passed away.  The following article -- originally published earlier this year -- has been updated to include a brief history of Vim.


Everyone who has spent any time with UNIX or Linux knows about vi — the ubiquitous text editor that seems to have existed since the dawn of time itself.

Likewise, there are better than even odds that the first time you ran vi (or vim, which is based on vi)… you got stuck and couldn’t figure out how to exit the gosh-darned program.

Don’t feel ashamed. It’s a right of passage.

Your first experience with vi / vim looked something like this. You know it’s true.

What follows is the story of that much loved — and much hated — text editor. Where it came from, who created it, how it was almost very different, and why on earth it is the way it is.

It all started with ed

As with so many stories in computer history, the tale of vi begins long before vi, itself, ever comes into existence.

Our story begins in August of 1969, at AT&T Bell Labs.

There, Ken Thompson was beginning work on what would become UNIX. At that time it was a barebones system, running on a PDP-7, consisting of only three little components: an assembler, a shell… and a simple text editor known as “ed”.

Ed, which is (obviously) short for “editor”, is a line-mode text editor — meaning you edit one line of text at a time. A process which can drive any person to the brink of madness.

Being a line editor, ed doesn’t look like much. So here’s a screenshot of the ed manpage.

Historical Side Note: The design of ed was inspired by QED (which is short for “Quick EDitor"“) — a similar line-mode text editor created for the Berkeley Time Sharing System in the mid-1960s — and was re-written for MULTICS (the precursor to UNIX) by Ken Thompson. So it seems natural that, when Thompson needed a basic text editor for UNIX… he would base it on the design of QED, which he was already so familiar with.

Ed quickly became the defacto line-mode text editor for UNIX — remaining a part of the POSIX standard to this very day.

A wild Pascal appears

A few years later, in 1975, Ken Thompson went to Berkeley (the University of California) and built a Pascal compiler for UNIX.

There, his Pascal compiler came to the attention of a student at UC Berkeley… Bill Joy. The man who would go on to create vi.

From Bill Joy’s 1999 interview with Linux Magazine:

“What happened is that Ken Thompson came to Berkeley and brought this broken Pascal system, and we got this summer job to fix it. While we were fixing it, we got frustrated with the editor we were using which was named ed. ed is certainly frustrating.”

As with so many stories in the advancement of software… work begins when a programmer gets frustrated with existing software.

“We got this code from a guy named George Coulouris at University College in London called em - Editor for Mortals - since only immortals could use ed to do anything. By the way, before that summer, we could only type in uppercase. That summer we got lowercase ROMs for our terminals. It was really exciting to finally use lowercase.”

Anyone who has used ed for any sizable project knows how frustrating it can be to use. While ed has many strengths (and is great for usage via shell scripts) editing large portions of text is not one of them.

Now, with inspiration from the “em” text editor, things really kicked into gear.

From the August 1984 issue of UNIX Review:

“So Chuck (Haley) and I looked at that and we hacked on em for a while, and eventually we ripped the stuff out of em and put some of it into what was then called en, which was really ed with some em features. Chuck would come in at night - we really didn't work exactly the same hours although we overlapped in the afternoon. I'd break the editor and he'd fix it and then he'd break it and I'd fix it. I got really big into writing manual pages, so I wrote manual pages for all the great features we were going to do but never implemented.”

Put simply… ed + em = en. Sort of.

Also, I love the whole “I wrote manual pages for all the great features we were going to do but never implemented” part. Been there!

Modems and Terminals and vi weirdness

Back to the 1999 Linux Magazine interview:

I don't know if there was an eo or an ep but finally there was ex. [laughter] I remember en but I don't know how it got to ex. So I had a terminal at home and a 300 baud modem so the cursor could move around and I just stayed up all night for a few months and wrote vi.”

ed… em… en… [eo… ep?]… ex… then, finally, vi.

That is how we got to vi. The family tree of vi, if you will.

Worth noting here that “vi” is short for “visual mode of ex”. Running “vi” is literally a shortcut for launching the “ex” text editor directly into the full screen “visual mode” instead of the default “line mode”

In fact, if you were already running ex, you could enter the “visual mode” by entering the vi command.

And, what’s that? Vi was programmed on a 300 baud modem?

Seriously. Considering a 300 baud modem is 1/4th the speed of a 1200 baud modem (which transmits text slower than most people can read it)… this explains much of the design of vi.

“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. It was just barely fast enough.”

Here, Bill Joy compares the reasons behind the design differences between emacs and vi:

“The people doing Emacs were sitting in labs at MIT with what were essentially fibre-channel links to the host, in contemporary terms. They were working on a PDP-10, which was a huge machine by comparison, with infinitely fast screens.

So they could have funny commands with the screen shimmering and all that, and meanwhile, I'm sitting at home in sort of World War II surplus housing at Berkeley with a modem and a terminal that can just barely get the cursor off the bottom line.

It was a world that is now extinct. People don't know that vi was written for a world that doesn't exist anymore.

Short, single character commands in vi kept things usable even of that slow connection.

As Bill Joy put it, “vi was written for a world that doesn't exist anymore.”

While the hardware limitation of the 300 baud modem had a significant influence on the design of vi… arguably the terminal (and keyboard) being used by Bill Joy had an even bigger impact.

That terminal: the ADM-3A built by Lear Siegler.

The ADM-3A is the model of terminal that Bill Joy programmed ex visual mode (aka vi) on.

For example: Why does vi use H, J, K, and L for cursor movement? Because, on the ADM-3A, those keys doubled as the arrow keys.

The keyboard layout of the ADM-3A.

You’ll also note that the Escape key is where the Tab key is on most modern keyboard. That’s why Esc is the vi mode switching key… it was, on that keyboard, easy to hit without moving your left hand off of the home row.

And, despite common keyboard layouts no longer being like this, vi stayed this way.

Vi almost changed significantly

A fun little sidenote: Bill Joy almost added multi-window support and other features… but he didn’t have backups of his code. And, as is the way, he lost that code.

“I was in the process of adding multiwindows to vi when we installed our VAX, which would have been in December of '78. We didn't have any backups and the tape drive broke. I continued to work even without being able to do backups. And then the source code got scrunched and I didn't have a complete listing. I had almost rewritten all of the display code for windows, and that was when I gave up. After that, I went back to the previous version and just documented the code, finished the manual and closed it off. If that scrunch had not happened, vi would have multiple windows, and I might have put in some programmability - but I don't know.”

Yep. We were this close to vi being quite different in those early days.

But the source code got “scrunched”.

Which is a technical term. I think.

Vi… forever

In May of 1979, Bill Joy — who was also the driving force behind BSD — released the first public version of vi (the visual mode for the ex text editor) as part of the 2nd release of the Berkeley Software Distribution (2BSD).

While, at this point, BSD was not yet a full operating system — it was an archive of a few pieces of software for UNIX — this was the launching pad for what would become one of the most famous (and infamous) text editors ever created.

While vi may have initially only been distributed to a mere 75 people (as part of the 2BSD archive)… it would go on to become a standard of POSIX, distributed on nearly every UNIX-alike system for the last 40 years.

More likely than not, people will be struggling to escape from vi another 40 years into the future.

Heck. A million years from now only three things will remain: cockroaches, Hostess Twinkies, and vi.

All because Bill Joy used an ADM-3A terminal on a 300 baud connection to build a text editor to fix a broken Pascal compiler.

Not too darned shabby for a mode of a text editor written for a world that doesn't exist anymore.

The Story of Vim

As popular -- and historically significant -- as vi is... one of vi's clones is, arguably, even more widely used: Vim.  Linux users regularly vote for Vim as their favorite text editor (or, at least, one of their favorites).

The path from vi to Vim wound through Unix, Atari ST, and Amiga systems... and back again.

  • In 1987, a man named Tim Thompson created a vi clone (from scratch, with no code copied from vi) for the Atari ST.  He called it STEVIE (which stands for ST Editor for VI Enthusiasts.)
  • In 1988, STEVIE was ported to OS/2, Amiga, and UNIX by Tony Andrews.
  • Later in 1988, Bram Moolenaar took the source code for the Amiga port of STEVIE and began modifying it to meet his own needs.  The result was Vim (or "Vi IMitation").  Because it wasn't a fork or port of Vi... but an imitation.
  • Moolenaar would continue to work on Vim for the next few years, eventually making the first public release in 1991.

Eventually (in 1993), the "Vi IMitiation" name was changed to "Vi IMproved"... and Vim was ported to an incredible number of platforms -- from UNIX to DOS to Haiku.

And it still uses those same, crazy, vi default keys... inspired by the ADM-3A.

community logo
Join the Lunduke Community
To read more articles like this, sign up and join my community today
17
What else you may like…
Videos
Podcasts
Posts
Articles
4Chan and Kiwi Farms File Lawsuit Against UK

It is both an important legal case... and a brilliant trolling of the British government.

The article:
https://lunduke.substack.com/p/4chan-and-kiwi-farms-file-lawsuit

More from The Lunduke Journal:
https://lunduke.com/

00:21:00
Microsoft Fires "Intifada" Employees

This last week, a group of anti-Jewish Microsoft employees got rowdy. Microsoft fired some of them and sent The Lunduke Journal a statement. Then held a media briefing. Let's watch it together.

More from The Lunduke Journal:
https://lunduke.com/

00:27:39
Video of "Worker Intifada" Occupying Microsoft President's Office

Last week the Microsoft "Worker Intifada" ransacked a farmers market and chanted "Go away, Jews!" Today they got arrested in Microsoft's President's office. We have the video.

The Brad Smith office "occupation" video clips:
https://x.com/LundukeJournal/status/1960502030692229479

More from The Lunduke Journal:
https://lunduke.com/

00:19:50
November 22, 2023
The futility of Ad-Blockers

Ads are filling the entirety of the Web -- websites, podcasts, YouTube videos, etc. -- at an increasing rate. Prices for those ad placements are plummeting. Consumers are desperate to use ad-blockers to make the web palatable. Google (and others) are desperate to break and block ad-blockers. All of which results in... more ads and lower pay for creators.

It's a fascinatingly annoying cycle. And there's only one viable way out of it.

Looking for the Podcast RSS feed or other links? Check here:
https://lunduke.locals.com/post/4619051/lunduke-journal-link-central-tm

Give the gift of The Lunduke Journal:
https://lunduke.locals.com/post/4898317/give-the-gift-of-the-lunduke-journal

The futility of Ad-Blockers
November 21, 2023
openSUSE says "No Lunduke allowed!"

Those in power with openSUSE make it clear they will not allow me anywhere near anything related to the openSUSE project. Ever. For any reason.

Well, that settles that, then! Guess I won't be contributing to openSUSE! 🤣

Looking for the Podcast RSS feed or other links?
https://lunduke.locals.com/post/4619051/lunduke-journal-link-central-tm

Give the gift of The Lunduke Journal:
https://lunduke.locals.com/post/4898317/give-the-gift-of-the-lunduke-journal

openSUSE says "No Lunduke allowed!"
September 13, 2023
"Andreas Kling creator of Serenity OS & Ladybird Web Browser" - Lunduke’s Big Tech Show - September 13th, 2023 - Ep 044

This episode is free for all to enjoy and share.

Be sure to subscribe here at Lunduke.Locals.com to get all shows & articles (including interviews with other amazing nerds).

"Andreas Kling creator of Serenity OS & Ladybird Web Browser" - Lunduke’s Big Tech Show - September 13th, 2023 - Ep 044
14 hours ago

This seems crazy scary (and good)

🌈 💥 I suppose that I would spend my time with "Tropico", or the first two "Fallout" games, or entertain myself with "Day of the Tentacle."

😸 I actually felt a little better, "Doom Scrolling" the post.

post photo preview
August 27, 2025

Reinstalling OSX on my old PPC Mac Mini. It verifies the install CD whether you like it or not. I can't stand that kind of thing. “Oh now, it's for your own good, you know”. My own good is “not having to sit around for half an hour waiting for verification of a disc that I already know is good and don't actually care if it isn't anyway because it's a 20-year-old OS on a 20-year-old machine and I'm only doing this because I messed up a Linux install and actually want to check that the hard disk will still boot an OS”.

Grr.

post photo preview
Android to Require Developer ID Checks
Want to publish Android software? You'll need to let Google verify your identity. Plus: Google commits to supporting Sideloading and Third Party App Stores.

Google has announced that they will be requiring all Android Apps — including “sideloaded” apps installed outside of the Google Play Store — to undergo developer identity verification.

Android Developer ID Check

“Starting next year, Android will require all apps to be registered by verified developers in order to be installed by users on certified Android devices,” says Google. “Think of it like an ID check at the airport, which confirms a traveler's identity but is separate from the security screening of their bags; we will be confirming who the developer is, not reviewing the content of their app or where it came from.”

 

These requirements will go into full effect in September of 2026 (one year from now), but only for developers in four countries: Brazil, Indonesia, Singapore, and Thailand.

Countries which, according to Google, suffer from “fraudulent app scams, often from repeat perpetrators”.

The idea seems simple enough: If a developer is known to make Android malware, Google will have the ability to block their software from being installed. Thus preventing the spread of Malware.

We will see how well this system works, in practice, next year.

 

It also remains to be seen when this “Google App Developer Identity Verification” requirement will be enforced in other countries (such as the USA). For the moment, Google is simply saying “2027 and beyond”… so there’s still time left for this policy to be modified.

As part of the process, Google is launching a new “Android Developer Console”, specifically for developers to verify their identity and register their applications.

The Practical Impact

What does this new “ID verification” for Android Devs mean… in the real world?

Once this change is worldwide:

  • A developer must be “verified” before their software can be installed via any mechanism — including Sideloaded Apps, and alternative App Stores (such as F-Droid).

  • Developing and publishing Android software, in an anonymous fashion, will no longer be supported.

Google is also, it appears, committing to continuing to allow “sideloading” and third party App Stores for the foreseeable future.

In other words: If a user wants to sideload software, or use F-Droid, Google will allow that. But Google is going to know the real-world identity of the developer / publisher of any software that gets installed.

The War on Sideloading, Revised

Google and Apple have been at war with the concept of “sideloading” (aka “Installing software the normal way”) for several years now. With both companies adding new features to their systems which allow them to block the ability of users to install “non-approved” software.

 

In that context, this particular announcement from Google is a bit of a double edged sword.

From Google’s announcement:

“To be clear, developers will have the same freedom to distribute their apps directly to users through sideloading or to use any app store they prefer. We believe this is how an open system should work—by preserving choice while enhancing security for everyone.”

On the one hand, requiring ID verification for developers is clearly a big step towards increased control over what software is installable on the systems we own.

On the other hand, Google is making it clear they intend to support sideloading & third party App Stores into the future.

Something they have been hesitant about in the past.

Read full Article
post photo preview
All Lunduke Journal Videos Now Free for Everyone
All Articles. All Audio Podcasts. And, yes, all Videos from The Lunduke Journal. Free. For subscribers and non-subscribers alike. On all publishing platforms.

The Short-Short Version: Articles, Podcasts, and Videos — from The Lunduke Journal — are now, once again, free for absolutely everyone. Subscribers and non-Subscribers alike. On all publishing platforms.

The Slightly Less Short Version

A little over two weeks ago, The Lunduke Journal implemented a change. All of the Articles & Audio Podcasts would remain free for everyone… but the Videos would now be published as subscriber exclusives. Non-subscribers would no longer have access to videos.

This was what is known as a “Huge Mistake Made by a Total Bonehead”.

 

While the motivation for that change was well intentioned (to provide some perks for all of the amazing subscribers who make The Lunduke Journal possible, and maybe encourage some new subscribers in the process)… in practice it was an absolute disaster.

The key problem with making all of the videos “Subscriber Exclusives” was, in hindsight, incredibly obvious:

Many people will subscribe to The Lunduke Journal on one platform… but prefer to watch (or read… or listen) to The Lunduke Journal on a completely different platform.

For example: Someone who subscribes on Locals may watch the videos on YouTube. Another person who subscribes on Substack may watch on Rumble. And so on.

And, by making those videos “Subscriber Only”, it made watching The Lunduke Journal’s videos significantly more difficult for… Subscribers. The very people it was supposed to be a perk for.

Whoopsie Daisy

Well. Shoot. I’m man enough to admit when I’ve made a mistake. And, boy howdy, was that a mistake!

 

Effective immediately, Videos are now officially free for everyone (just like the Articles & Podcasts). On all platforms which The Lunduke Journal publishes to. Because making sure reading, listening to, and watching The Lunduke Journal is convenient for all of you is a top priority.

Over the next day, all of the “Subscriber Exclusive” videos (published over the last 2 weeks) will become free for everyone.

Running The Lunduke Journal is Not Easy

Just as an aside: What we’re doing with The Lunduke Journal is… unique.

Pretty much every Tech Journalist is funded by Big Tech. Money for advertisements. Money for sponsorships. Money for “paid articles” that look like real journalism but are, in fact, just repackaged ads and press releases.

Take away that Big Tech money and 9 out of 10 Tech News outlets would go out of business tomorrow. Which means they all need to keep Big Tech happy. And that shows in their coverage (and their refusal to touch many important news stories).

By choosing to not take a single penny from Big Tech, The Lunduke Journal has the freedom to tell the truth. To follow the Tech News stories wherever they lead (no matter who it makes grumpy).

But it also means that keeping The Lunduke Journal in business is even trickier than it is for all of those Brand X Tech News Outlets (which already have a hard time staying afloat, even with the Big Tech moolah).

What’s amazing… is that we, against all odds, have pulled it off. For several years now, The Lunduke Journal has stayed in business without taking a dime from Big Tech. And that’s all thanks to all of you. Thank you for making this possible.

If you haven’t grabbed a subscription, just a reminder that now is a great time to do that. 50% off through the end of August (which is a few days from now).

Want to support The Lunduke Journal having all videos (and everything else) for free for the world? That would be a great way to do it.

Once again. Seriously.

Thank you.

-Lunduke

Read full Article
post photo preview
Omarchy 2.0 - The Arch-Based, Hyprland, Non-Woke Distro
The 2.0 release of the unabashedly nerdy, developer focused, & DEI-free Linux distribution is here. And people are flocking to it.

Omarchy, an Arch-based Linux distribution which self-describes as “An opinionated Arch + Hyprland Setup”, has just published their 2.0 release.

 

Omarchy was started by David Heinemeier Hansson (DHH), the creator of Ruby on Rails, as a command-line and developer focused (and unabashedly nerdy) configuration of Arch Linux.

In the short time since it began (back in June), Omarchy has captured a massive amount of interest and has grown to become a full-fledged distribution in its own right.

Omarchy 2.0 boasts a new ISO installation method, AUR-free installation, a Chrome micro-fork with live theme switching, a Starship prompt, a new icon, and 400 other changes (from 45 contributors).

 

According to DHH, the Omarchy Discord now has over 6,000 members with the website having received over 100,000 unique visitors in the last month.

Not too shabby for a Linux distribution that is only 2 months old.

Speaking of Discord, if the Omarchy installation fails, it displays a QR code with an invite link to the Omarchy support channel. I thought that was a rather nice touch.

 

Worth noting that Omarchy — and the Hyprland window manager, which Omarchy uses by default — both were added to “Lunduke’s Non-Woke Software List” this month.

 

Omarchy is yet another Open Source project which has steered clear of Woke & DEI politics… and has seen tremendous success and adoption. We have seen that same scenario play out repeatedly now, with projects like OpenMandriva, XLibre, Hyprland, & Brave.

Avoid DEI. Experience a flood of users, contributors, and excitement.

A pattern is emerging. Hopefully more projects learn this important lesson.


The Lunduke Journal is the last bastion of truly independent Tech Journalism. Ad Free, Big Tech Free, Non-Woke, & Audience Supported.

Read full Article
See More
Available on mobile and TV devices
google store google store app store app store
google store google store app tv store app tv store amazon store amazon store roku store roku store
Powered by Locals