Skip to content

Vim - It’s friends

Vim (Vi IMproved) is a highly popular clone of the original vi editor. Understanding vi’s history and other vi clones helps appreciate Vim’s design philosophy and its extensive feature set. This chapter briefly explores vi and some of its notable derivatives.

In this chapter, we will discuss:

  • Vi - The Original
  • Stevie - An Early Clone
  • Elvis - A More Capable Clone
  • nvi - The BSD Vi
  • Vim - Vi IMproved
  • Vile - Vi Like Emacs
  • A Note on Neovim
  • Compatibility with Original Vi

vi (short for Visual) is a screen-oriented text editor originally created for the Unix operating system. Bill Joy wrote the initial code in 1976, and it was first released as part of the Berkeley Software Distribution (BSD). vi was an evolution of ed, a line editor, bringing a full-screen interface to text editing, which was revolutionary at the time.

vi introduced the concept of modal editing, separating modes for entering text, executing commands, and selecting text. This core design principle is inherited by Vim and is fundamental to its efficiency.

Stevie (ST Editor for VI Enthusiasts) was one of the first vi clones, developed by Tim Thompson for the Atari ST platform and released in 1987. It provided a subset of vi’s functionality, offering a familiar vi-like environment on a different system.

Elvis, developed by Steve Kirkendall, aimed to be a more complete vi clone than Stevie. It addressed some of Stevie’s limitations, such as loading the entire file into RAM, by introducing buffers. Elvis also added features like syntax highlighting, multiple window support, and basic networking capabilities, prefiguring some of Vim’s advancements.

nvi (new vi) was developed by Keith Bostic as a bug-for-bug compatible replacement for the original vi. This was necessitated by licensing issues with AT&T’s ed (and thus vi) code, which prevented its free distribution with BSD. nvi is the version of vi shipped with many BSD-derived systems, including FreeBSD, NetBSD, OpenBSD, and macOS (where it’s typically found as /usr/bin/vi).

Vim, created by Bram Moolenaar, started as a vi clone for the Amiga in 1991 (initially called Vi IMitation). It has since grown into a vastly more powerful editor, adding a multitude of features while retaining strong vi compatibility. Key Vim enhancements include:

  • Multi-level undo
  • Multiple windows, tabs, and buffers
  • A powerful scripting language (Vimscript) for extending functionality
  • Extensive syntax highlighting for hundreds of programming languages and file types
  • Visual mode for text selection
  • Command-line history and completion
  • Built-in help system
  • Integration with compilers, interpreters, and debuggers
  • Support for plugins and a large ecosystem of community contributions

Vile (VI Like Emacs) is an editor that attempts to combine features from both vi and Emacs. It maintains vi’s modal editing but incorporates Emacs-style features like multiple buffers and windows, and a procedural extension language.

Neovim is a significant, more recent fork of Vim that started in 2014. It aims to aggressively refactor Vim’s codebase to improve maintainability, encourage community contributions, and enable new features like better asynchronous processing, first-class Lua scripting, and an embedded terminal. Neovim strives for compatibility with Vim’s core features and Vimscript while pushing boundaries in extensibility and integration with modern development tools (e.g., Language Server Protocol).

While all the editors mentioned are vi clones or derivatives, their compatibility with the original vi varies. Vim, in particular, aims for high vi compatibility (especially when run in compatible mode via :set compatible), meaning most vi commands work as expected in Vim. However, Vim’s default mode (nocompatible) enables many improvements that differ from strict vi behavior.

Clone/DerivativeApprox. Vi CompatibilityKey Notes
StevieLowBasic subset of Vi features.
VileLow-MediumVi modes with Emacs-like features.
ElvisMedium-HighMore complete Vi clone with added features.
nviVery HighIntended as a bug-for-bug compatible replacement.
VimVery High (Highly Compatible)Almost identical to Vi in compatible mode, with vast improvements and additions in default mode.
NeovimVery High (Vim Compatible)Aims for Vim compatibility while modernizing the codebase and architecture.

Understanding this lineage highlights Vim’s robust foundation and its evolution into one of the most powerful and versatile text editors available today.