Vim Cheatsheet

Complete Vim reference — modes, navigation, editing, search & replace, macros, and configuration.

What it does

7 sections, 80+ entries

Covers modes, navigation, editing, search & replace, files/buffers/tabs, macros, and vimrc config.

Operator + motion patterns

Entries show composable combinations (dw, ci", dip) so you learn the system, not just individual commands.

Configuration snippets

Ready-to-paste vimrc settings for line numbers, indentation, search, clipboard, and keymaps.

How to use Vim Cheatsheet

  1. 1
    Start with modes

    If you're new to Vim, read the Modes section first. Understanding Normal, Insert, and Visual modes is the foundation of everything else.

  2. 2
    Learn navigation

    Master hjkl, word motions (w/b/e), and file jumps (gg/G) before anything else — efficient navigation multiplies all other skills.

  3. 3
    Combine operators and motions

    Vim's power is operator + motion: 'd' (delete) + 'w' (word) = dw. Once you see the pattern, hundreds of combinations become intuitive.

  4. 4
    Copy settings to your vimrc

    Click copy on any configuration entry and paste it into your ~/.vimrc or init.lua for permanent setup.

Frequently Asked Questions

How do I exit Vim?

Press Esc to ensure you're in Normal mode, then type ':q' to quit (if no unsaved changes), ':wq' or 'ZZ' to save and quit, or ':q!' to quit and discard changes.

What are text objects in Vim?

Text objects let you target semantic units of text with operators. 'ciw' means change-inner-word. 'ca"' means change-around-quotes (including the quotes). 'dip' means delete-inner-paragraph. They work with all operators: d (delete), c (change), y (yank), v (select).

What is the dot command in Vim?

The dot (.) repeats the last change. If you ran 'ciw' to change a word and typed a replacement, pressing '.' elsewhere repeats the same change on the next word. This is one of Vim's most powerful features.

How do macros work in Vim?

Press 'q' followed by a letter (e.g., 'qa') to start recording. Perform your actions. Press 'q' to stop. Then '@a' replays the macro. '@@' replays the last macro. Prefix with a count to run it N times: '10@a'.

Related Tools