Vi
Bill Joy's modal screen editor from 1970s Berkeley — the terse, keyboard-driven visual mode of ex that became the standard Unix text editor, was written into POSIX, and lives on through nvi, Vim, and vi keybindings across modern software.
Created by Bill Joy
vi is the visual editor of Unix — a full-screen, modal text editor written by Bill Joy at the University of California, Berkeley in the mid-1970s. It is not a programming language in the conventional sense, but its terse command vocabulary forms a small, composable language of its own: operators combine with motions and counts so that d2w deletes two words and 3dd deletes three lines. That grammar, forged under the constraints of 300-baud modems and dumb terminals, proved so durable that half a century later it survives essentially unchanged in nvi, Vim, Neovim, BusyBox, and vi-emulation modes across nearly every serious editor and IDE. vi’s behavior is specified by POSIX and the Single UNIX Specification, making it the one editor a Unix user can traditionally expect to find on any conforming system.
History & Origins
From ed to em to ex
vi’s ancestry begins with ed, Ken Thompson’s terse line editor from the earliest days of Unix — an editor so spartan that its usual response to an error was a single ?. In February 1976, George Coulouris at Queen Mary College, London wrote em — the “editor for mortals” — which extended ed with single-line visual editing on video terminals: for the first time, you could see the line you were changing as you changed it.
Coulouris visited Berkeley in the summer of 1976 and demonstrated em there. Graduate students Bill Joy and Chuck Haley took the idea and ran with it, evolving the ed/em lineage into a new, more capable line editor called ex (“extended”). Joy’s ex 1.1 shipped with the first Berkeley Software Distribution (1BSD) in March 1978.
The visual mode becomes vi
Joy then gave ex a full-screen visual mode, in which the terminal displays a window into the file and edits appear in place. With ex 2.0, released as part of 2BSD in May 1979, the editor was installed under the name vi — a link that launched ex directly into visual mode. The name is simply the shortest unambiguous abbreviation of ex’s visual command. This heritage explains a fact that still surprises newcomers: vi and ex are one program, and vi’s : commands are ex — typing : in vi drops you to the ex command line that the visual mode was built on top of.
Around 1979 Joy handed maintenance to Mary Ann Horton, who continued developing ex/vi at Berkeley, adding support for arrow and function keys among other improvements; the editor subsequently spread from BSD into AT&T’s commercial UNIX releases and became the standard editor of the Unix world. In a 1984 interview, Joy attributed much of vi’s success to the simple fact that it was bundled for free, while rivals such as Emacs could cost hundreds of dollars at the time.
Designed for a slow, small world
vi’s famous terseness was not an aesthetic choice but an engineering response to 1970s hardware. Joy developed the editor over a 300-baud modem — roughly 30 characters per second — against terminals with no function keys, no mouse, and barely any memory. Single-character commands and the ability to type ahead of a lagging display were survival features. The keyboard of Joy’s Lear Siegler ADM-3A terminal explains two of vi’s most distinctive traits: the ADM-3A printed arrows on its h, j, k, and l keys, which became vi’s cursor motions, and placed the Escape key where Tab sits on modern keyboards — comfortably close for switching modes. Joy later reflected on these origins with characteristic bluntness: “The fundamental problem with vi is that it doesn’t have a mouse and therefore you’ve got all these commands.”
Design Philosophy
Modal editing
vi’s central idea is that an editor should have modes. In command mode (also called normal mode), every key is an editing command: x deletes a character, dd deletes a line, p pastes. Only after an explicit command such as i (insert) or a (append) does the keyboard type text, and Esc returns to command mode. The payoff is that the entire keyboard becomes a control surface — no chorded modifier keys, no reaching for arrows or a mouse — at the cost of a learning curve that has launched decades of “how do I exit vi?” jokes.
A grammar, not a command list
What separates vi from merely terse editors is that its commands compose. Operators (d delete, c change, y yank) combine with motions (w word, $ end of line, } paragraph, /pattern search) and counts:
| |
Learning one new motion instantly multiplies what every operator can do. Combined with the . repeat command, named buffers (registers), marks, and key mapping via :map, a fluent vi user edits in reusable sentences rather than individual keystrokes — the property most responsible for vi’s cult-like retention among its users.
Two editors in one
Because vi is ex’s visual mode, the full ex line-editor rides along underneath. : commands provide file operations (:w, :q, :e), ranged edits (:10,20d), and — most powerfully — ed-style regular-expression substitution and the :g global command:
| |
This dual nature let vi span both worlds of 1970s editing: fast interactive screen work and the batch, pattern-driven manipulation that ed and its descendants (sed, grep, AWK) made a Unix signature.
Evolution
The clone era
Original vi was built on ed’s source, so it carried AT&T’s Unix source license — you could not legally run or study vi’s code without one. As Unix spread to platforms and communities without AT&T licenses, programmers wrote vi from scratch:
| Clone | Year | Author | Notes |
|---|---|---|---|
| Stevie | 1987 | Tim Thompson | “ST Editor for VI Enthusiasts,” written for the Atari ST |
| Elvis | 1990 | Steve Kirkendall | Posted to comp.os.minix; aimed at faithful vi compatibility |
| Vim | 1991 | Bram Moolenaar | First public release November 2, 1991 for the Amiga, built from a port of Stevie |
| nvi | 1994 | Keith Bostic | Bug-for-bug-compatible rewrite based on Elvis, made for license-free 4.4BSD-Lite |
The licensing question came to a head during Berkeley’s effort to produce a Unix free of AT&T code. Keith Bostic’s nvi (“new vi”), released in spring 1994, replaced the encumbered original in 4.4BSD-Lite and remains the vi of the BSD operating systems today.
Standardization and liberation
IEEE Std 1003.2-1992 (POSIX.2) specified the behavior of ex and vi, and the editor remains part of POSIX and the Single UNIX Specification — a rare case of an interactive program’s exact command set being enshrined in an international standard. The original code’s story ended happily as well: in January 2002, Caldera International released the ancient Unix sources under a BSD-style license, finally making Joy’s actual ex/vi free software. Gunnar Ritter’s “Traditional Vi” port soon made the original editor buildable on modern Unix-like systems, where the curious can still run 1970s-vintage vi today.
Vim and beyond
Meanwhile the clones outgrew the original. Vim — renamed from “Vi IMitation” to “Vi IMproved” — added multi-level undo, syntax highlighting, windows, plugins, and a scripting language while preserving vi’s grammar, and became the default vi on most Linux distributions and macOS. Neovim, a community fork begun in the 2010s, modernized the codebase and embedded Lua for configuration. Both are best understood as vi’s modal editing model carried forward, which is why “vi keybindings” and “Vim keybindings” are used almost interchangeably.
Current Relevance
Original vi survives in three distinct ways. First, as a specification: POSIX systems provide a vi, and certified Unix systems must. Second, as working code: nvi ships in the BSD base systems, BusyBox includes a tiny vi applet that is often the only editor in containers, initramfs shells, and embedded firmware, and the Traditional Vi port preserves the genuine article. Third — and most broadly — as an interaction paradigm: bash’s set -o vi readline mode, the less pager’s motions, j/k navigation in Gmail and GitHub, and heavily downloaded vi/Vim emulation plugins for VS Code, JetBrains IDEs, and Emacs (Evil mode) all speak Joy’s command language. Few pieces of 1970s software have a user base still growing new fluent speakers.
Why It Matters
vi demonstrated that an interface built from constraints could outlive the constraints. Every design decision — modal editing, single-character commands, home-row motions, terse composable grammar — was forced by slow modems and dumb terminals, yet the result turned out to be a local optimum for keyboard-driven editing that no amount of subsequent hardware progress has displaced. Alongside Emacs, vi defined one pole of the great editor divide that has structured programmer culture for decades. It set the precedent that an editor’s command set could be a standard (POSIX), that a beloved interface could be reimplemented freely when licensing blocked the original (Stevie, Elvis, nvi, Vim), and that “knowing vi” is portable knowledge: the same muscle memory works on a 1979 VAX, a modern OpenBSD server, a stripped-down container, and a 2026 IDE with a Vim plugin. For an editor its own author described as written for a world that no longer exists, vi has proved remarkably good at living in every world since.
Timeline
Notable Uses & Legacy
POSIX and the Single UNIX Specification
vi is the standard visual editor of the Unix world by decree as well as by tradition: its behavior is specified by POSIX, so conforming systems provide a vi, and decades of Unix documentation assume it.
BSD operating systems
FreeBSD, NetBSD, and OpenBSD ship Keith Bostic's nvi in the base system as their /usr/bin/vi — the direct institutional descendant of Joy's editor at Berkeley.
System administration and rescue environments
In minimal, embedded, and recovery environments — BusyBox-based initramfs shells, containers, and appliance firmware — a small vi clone is frequently the only editor present, making vi fluency a core sysadmin survival skill.
Unix editor plumbing
Tools like visudo, vipw, and crontab -e are literally named for and historically wrapped around vi, and vi remains a traditional fallback for the EDITOR/VISUAL convention used by git, mail clients, and countless other programs.
Vi keybindings across modern software
vi's command vocabulary outgrew the editor itself: bash and other readline programs offer a vi editing mode, pagers like less use vi motions, web apps such as Gmail and GitHub adopted j/k navigation, and vi/Vim emulation plugins are among the most popular extensions for VS Code, JetBrains IDEs, and Emacs.
The Vim and Neovim ecosystem
Vim and its fork Neovim — modern descendants that preserve vi's modal grammar while adding plugins, scripting, and IDE features — keep vi-style editing among the most widely used editing paradigms in professional software development.
Language Influence
Influenced By
Influenced
Running Today
Run examples using the official Docker image:
docker pull busybox:latestExample usage:
docker run --rm -it busybox vi hello.txt