Fundamentals 7 min read

The History and Fundamentals of vi/vim Text Editors

The article traces vi’s origins from early PDP‑11 line editors through Bill Joy’s creation of ex and the birth of vi, explains its HJKL cursor keys, mode‑based command syntax, common editing commands, and shows how mastering vi/vim yields a powerful, keyboard‑centric editing environment still beloved by developers.

Java Tech Enthusiast
Java Tech Enthusiast
Java Tech Enthusiast
The History and Fundamentals of vi/vim Text Editors

This article narrates the origin and evolution of the vi editor, from early line editors on PDP‑11/70 to the modern Vim.

In the 1970s, Ken Thompson installed Unix on a PDP‑11/70 at Berkeley and wrote a Pascal compiler. Bill Joy, then a student, improved the ed editor and later created ex, a line‑oriented editor without a visible cursor.

Because the ADM‑3A terminals lacked dedicated arrow keys, vi inherited the H, J, K, L keys for cursor movement and used the Esc key (located where Tab is today) for mode switching. These conventions persist today.

vi introduced distinct modes (command, insert, command‑line) and a powerful command syntax, e.g., s/old/new/ for substitution and line‑addressing like 3 for the third line or $ for the last line.

Typical editing commands combine a verb, a motion (preposition), and a noun. Examples include:

diw – delete inside word cis – change inside sentence dte – delete till character ‘e’ vis – visual select inside sentence

The article also shows a concrete example of fixing a typo in a two‑line file using line numbers and the s command:

1
hello wold !
s/wold/world
1
hello world !

Despite its steep learning curve, mastering vi/vim provides a highly efficient, keyboard‑centric editing environment that many developers still cherish.

software historycommand lineediting commandsText EditorviVim
Java Tech Enthusiast
Written by

Java Tech Enthusiast

Sharing computer programming language knowledge, focusing on Java fundamentals, data structures, related tools, Spring Cloud, IntelliJ IDEA... Book giveaways, red‑packet rewards and other perks await!

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.