What Neovim Is
Neovim is a text editor — a fork of Vim, the modal editor that has been on Unix machines since 1991. Modal means the keyboard does different jobs at different times: in Normal mode keys are commands that move and reshape text; in Insert mode the same keys type characters, like any other editor. That two-mode grammar is the whole reason Vim is fast, and it is also the whole learning curve. Neovim kept it exactly. If you already know Vim, your hands already know Neovim.
What Neovim changed is everything underneath. Vim grew for decades by accretion: its own scripting language (Vimscript), its own plugin habits, features added one at a time against an architecture that made each addition harder than the last. In 2014 the project forked — fork meaning a copy of the code taken in a new direction by new maintainers — with a short list of rebuilds:
- Lua as a first-class language. Configuration and scripting are done in Lua, a small, fast, real programming language, instead of Vimscript alone. Chapter 4 is written in it.
- A real plugin architecture. Plugins are still files on disk, but they can run work in the background without freezing the editor, and since 0.12 Neovim even ships a small package manager of its own (chapter 6).
- A language server client, built in. A language server is a separate program that understands one programming language deeply — where each function is defined, what is misspelled, what a name refers to. Big IDEs talk to these servers. Neovim now does too, with no plugin required (chapter 8).
- Tree-sitter parsing, built in. The editor parses your file into a syntax tree — a structured map of the program — and uses the map for highlighting and navigation, instead of pattern-guessing (chapter 7).
- Headless and embeddable. Neovim can run with no screen at all, driven entirely by commands and scripts. That is not a party trick: it is how other programs embed Neovim as their editing engine, and it is how this guide's lab verified everything.
The name, then, is the honest version: not a replacement editor, a new Vim.
Why anyone would switch
Four honest reasons account for most moves from Vim to Neovim:
- The configuration stops fighting you. Vimscript is a language you learn for one program. Lua is a language — small, documented, and used far beyond editors — and your settings become ordinary code: variables, functions, loops.
- IDE features without an IDE. With a language server attached, the editor on a rented server or a Raspberry Pi answers go to definition, find references and rename this everywhere the way a desktop IDE does, because it is asking the same server the IDE asks.
- Highlighting that understands. Tree-sitter highlighting follows the actual structure of the code, so a string that looks like a keyword is coloured as a string, not as a keyword.
- It is scriptable to the metal. Every behaviour — options, mappings, reactions to events, whole commands of your own — is reachable from Lua or from the command line, and the same scripts run headlessly in automation. Chapter 9 lives on this.
A first taste
Everything in this guide is proven
against files on disk. Here is the
smallest proof, from the lab
(transcript neovim-lab/transcripts/t01-headless-edit.txt).
A shopping list with a typo:
Shopping list
milk
eggs
bred
coffee
edited by one headless command — fix the typo everywhere, append one line, save, quit:
nvim --headless notes.txt -c "%s/bred/bread/" -c "call append(line('$'), 'tea')" -c "write" -c "qa!"
and the file read back afterwards:
Shopping list
milk
eggs
bread
coffee
tea
No screen was involved. The same editor that did this in a script is the one that will sit in your terminal in chapter 3, waiting for the same commands from your keyboard.
Who it is for
The Vim user whose configuration has outgrown Vimscript. The developer who works on remote machines and wants one editor that is the same everywhere, with real code intelligence. The beginner who has decided to learn a modal editor once, and would rather learn the one whose insides are still being actively rebuilt. The common thread is a person who edits text every day and expects the tool to keep up.
What it is not
Neovim is not a different way of editing from Vim: the grammar this series' Vim guide teaches — operators, motions, text objects — is unchanged, and chapter 3 will point you there for the full course rather than repeat it. It is not an IDE out of the box: with no language server installed it knows nothing about your project's symbols, and chapter 11 is honest about the per-language homework. It is not a GUI program: the core is a terminal editor, and the graphical front ends that exist are separate projects driving the same engine. And it is not finished: the ecosystem moves quickly enough that this guide's own lab watched a well-known command vanish between versions (chapter 7) — which is the price of the rebuilding that made the rest possible.