Vim#
Vim (“Vi IMproved”) is the modal editor
that ships with every Unix system. Bram Moolenaar’s 1991 fork of
Stevie (a vi clone) became the de-facto standard descendant of Bill
Joy’s 1976 vi.
The Modal Idea#
Vim has modes. Keystrokes mean different things in each, which is the bit that throws beginners and the bit that makes Vim fast once you stop thinking about it. The four modes below cover almost everything; advanced modes (replace, visual-line, terminal) are variations on these:
Normal mode (default), keys are commands.
jmoves down.Insert mode, keys are text. Enter via
i/a/o.Visual mode, keys extend a selection. Enter via
v/V/Ctrl-v.Command-line mode,
:wq,:%s/old/new/g. Enter via:.
The payoff: text editing as a language. d is “delete”, i is
“inner”, w is “word”; diw deletes the word under the cursor.
ci" means “change inside quotes”. yap means “yank around paragraph”.
Composable verbs and motions.
Survival Cheat Sheet#
The minimum to get out of Vim alive and edit a config file without crying. For the full reference, see Vim; this is the subset you need before the muscle memory kicks in.
Movement
Keys |
Action |
|---|---|
h j k l |
← ↓ ↑ → |
w / b |
next / prev word |
0 / ^ / $ |
line start / first non-blank / line end |
gg / G |
file top / file end |
Ctrl-d / -u |
half-page down / up |
{ / } |
prev / next paragraph |
% |
matching bracket |
`` / `` |
previous cursor / mark |
Editing
Keys |
Action |
|---|---|
i / a |
insert before / after cursor |
o / O |
new line below / above |
dd |
delete line |
D |
delete to end of line |
yy |
yank (copy) line |
p / P |
paste after / before |
u |
undo |
Ctrl-r |
redo |
. |
repeat last change |
Search and replace
/pattern # search forward
?pattern # search backward
n / N # next / previous match
:%s/old/new/g # replace all in file
:%s/old/new/gc # with confirmation
:s/old/new/g # in current line
Files#
Vim’s state is split between configuration (.vimrc), runtime
assets (.vim/), and per-user state from the editor itself
(.viminfo). The first two travel between machines via dotfiles;
the third is local to each host.
~/.vimrc, configuration.~/.vim/, plugins, colors, syntax.~/.viminfo, per-user state (registers, marks, history).
Plugins#
Plugin managers in 2026 (Vim 9.x). The choice mostly comes down to
how much abstraction you want over the install / update / cleanup
loop. vim-plug is the popular middle ground; native
packadd skips the manager entirely:
Worth knowing:
coc.nvim, LSP support for Vim.ALE, linting / fixing.fzf.vim, fuzzy finder.vim-fugitive, Git integration.nerdtree/netrw, file browsers.
Vim Script and Vim 9#
Vim’s scripting language (Vimscript) has been the configuration
language for decades. Vim 9 (2022) added Vim9script, a faster,
more typed variant that compiles to bytecode and gets close to Lua’s
speed in Neovim. The classic Vimscript still works untouched, so
existing .vimrc files keep loading as before.
For most users, configuration is still .vimrc with familiar
set/map/autocmd lines.
Strengths#
What Vim still wins on, decades into its run. Most of these are “because it has been here longer than anything else” wins; the ubiquity, the speed, and the depth of the documentation come from sustained use, not active development.
Everywhere, you’ll always find vi or Vim on a Unix system.
Fast, starts instantly, runs on the smallest hardware.
Composable editing language.
Decades of tutorials, plugins, documentation.
Weaknesses#
What Vim has been losing ground on, mostly to Neovim and Helix. The plugin ecosystem moves slowly, the configuration language is awkward compared to Lua, and the modal learning curve has never gotten any gentler.
Steep learning curve, modal editing is unfamiliar at first.
Plugin ecosystem ages slowly compared to Neovim’s.
Vimscript was awkward as a language; Vim9script helps but Lua is more pleasant in Neovim.
When to Pick Vim#
The default for any environment you do not control. Vim is on the host whether you put it there or not, which makes it the right choice for server work, container shells, and rescue images even if Neovim or Helix is your daily driver elsewhere.
Editing on a server where only Vim is installed.
You want a light, stable, portable modal editor.
Long-time Vim users who don’t want to manage Lua plugins.
For new modal users in 2026, Neovim or Helix is usually the better starting point.