Fundamentals 7 min read

The History and Core Concepts of vi/vim: From Ken Thompson’s Lectures to Modern Editing

This article recounts Ken Thompson’s 1975 teaching stint at Berkeley, the emergence of Bill Joy’s contributions to Unix, and explains vi/vim’s core command structure—operators, motions, and modifiers—illustrating how mastering these fundamentals transforms the editor from daunting to powerful.

IT Services Circle
IT Services Circle
IT Services Circle
The History and Core Concepts of vi/vim: From Ken Thompson’s Lectures to Modern Editing

In the autumn of 1975, Ken Thompson took a sabbatical from Bell Labs to serve as a visiting scholar at the University of California, Berkeley, where he installed Unix on a PDP‑11/70 and taught a Unix course, even guiding students through the kernel source line by line.

Among his students was graduate student Bill Joy, who not only mastered Unix but also extended it, creating the TCP/IP interface that became the foundation of the BSD distribution.

Joy later demonstrated his own text editor to Brian Kernighan, the co‑author of "The C Programming Language," sparking the development of the editor that would become known as vi.

After leaving graduate school, Bill Joy co‑founded Sun Microsystems, cementing his legacy in the computing world.

The article then shifts focus to vi (and its descendant vim), explaining why the editor’s steep learning curve can be overcome by understanding its underlying logic.

At the heart of vi lies a simple formula: operator + motion = operation . This orthogonal design lets users combine actions (verbs) with text objects (nouns) and modifiers (prepositions) to perform complex edits.

Common verbs include d (delete), r (replace), y (yank), and v (visual). Nouns represent the text to act upon, such as w (word), s (sentence), and p (paragraph).

Modifiers specify the scope or position, for example i (inside), a (around), t (till), and f (find). Combining them yields commands like diw (delete inside word), cis (change inside sentence), dte (delete till ‘e’), and vis (visual inside sentence).

Newer verbs such as gU convert text to uppercase, allowing constructs like gUis (uppercase inside sentence) or gUip (uppercase inside paragraph). A custom modifier t can target HTML/XML tags, enabling commands like dit (delete inside tag) to remove content while preserving tags.

When built‑in objects are insufficient, plugins like vim-textobj-rubyblock add new nouns (e.g., ruby block) and commands such as var (visual around ruby block) to extend editing capabilities.

This orthogonal command system exemplifies a powerful design philosophy: verbs, nouns, and modifiers are independent yet combinable, allowing users to craft concise, expressive editing commands.

The article concludes by encouraging readers to explore vi/vim further, practice the commands, and appreciate the elegance of its design.

programmingUnixText EditorviVimSoftware FundamentalsCommand
IT Services Circle
Written by

IT Services Circle

Delivering cutting-edge internet insights and practical learning resources. We're a passionate and principled IT media platform.

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.