Cheatsheet Pages / Vim Cheatsheet

A survival ~/.vimrc — four settings that pay off daily

A minimal vimrc that fixes Vim's most annoying defaults without turning into a plugin project.

Almost every entry was run headless in Vim 9.1 and the resulting file checked; the few entries a tiny build cannot run (system clipboard, persistent undo, the sudo save) were verified against Vim's own documentation instead.

set number relativenumber   " line numbers: absolute here, relative around it (jumps get easy)
set expandtab shiftwidth=2  " Tab inserts spaces, one indent level = 2 of them
set ignorecase smartcase    " case-insensitive search, unless you type a capital
set undofile                " keep undo history in a file — undo survives closing Vim
                            " (needs a Vim built with +persistent_undo; most full builds have it)
Vim Cheatsheet one-page card — commands that actually work
The full one-page card — Vim Cheatsheet. Get the complete cheatsheet on GitHub