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
- 1Start 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.
- 2Learn navigation
Master hjkl, word motions (w/b/e), and file jumps (gg/G) before anything else — efficient navigation multiplies all other skills.
- 3Combine operators and motions
Vim's power is operator + motion: 'd' (delete) + 'w' (word) = dw. Once you see the pattern, hundreds of combinations become intuitive.
- 4Copy 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
Linux Commands Cheatsheet
Essential Linux and Bash commands for navigation, files, processes, networking, and scripting. Search and copy instantly.
Git Cheatsheet
Essential Git commands — setup, branching, merging, remotes, undoing changes, and more. Search and copy instantly.
Cheatsheet Hub
Interactive cheatsheets for Git, CSS, Linux, React, Vim, and more. Search, filter, and copy commands instantly.
Vim Adventure
Learn Vim by playing. Free browser-based game with 25 levels teaching hjkl, word motions, search, deletion, and more. No signup, no paywall, progress saved locally. Best free Vim Adventures alternative.
CSS Cheatsheet
Quick reference for CSS selectors, Flexbox, Grid, typography, animations, and modern CSS. Search and copy instantly.