The Vim Grammar

[count] [register] operator [count] {motion | text-object}

Keys: [count], [reg], op, motion, text-object

Every editing command in Vim is one sentence: optional count, optional register, an operator (verb), then a motion or text object (noun). This is the grammar that makes Vim feel infinite from a small number of keys.

Most editors have commands: "delete word," "select to end of line," "comment block." Vim doesn't. Vim has a grammar โ€” a small set of verbs and nouns that you compose into sentences. Once you see it, you stop memorizing keys.


Reference

See `appendix.grammar-matrix` for the full operator ร— motion table, and `appendix.synonyms` for the complete list of single-key aliases.

Watch

See also: The Universal Grammar, The Grammar Matrix, Synonyms and Shortcuts