Vim Cheat Sheet.
2026-07-15
Keyboard bindings and cheat sheet for the Vim text editor. For complete help, in Vim:
:help
:help quickref
Download file vim.keys
| program | context | action | shortcut |
|---|---|---|---|
| Vim | Help | Open help for Vim command argument (e.g., :h -r) | :h -char |
| Vim | Help | Open help for regular expression (e.g., :h /[) | :h /expr |
| Vim | Help | Open help for Normal command line command (e.g., :h :quit) | :h :cmd |
| Vim | Help | Open help for Normal command line command (e.g., :h c_Del) | :h c_cmd |
| Vim | Help | Open help for Normal mode command (e.g., :h filetype) | :h cmd |
| Vim | Help | Open help for Insert mode command (e.g., :h i_Esc) | :h i_cmd |
| Vim | Help | Open help for Vim option (e.g., :h ‘textwidth’) | :h option |
| Vim | Help | Open help for Visual mode command (e.g., :h v_u) | :h v_cmd |
| Vim | Help | See matching help entries for word (e.g., :helpgrep filepath) | :helpgrep w |
| Vim | Help | See matching help entries for word (after typing :h word) | Ctrl + D |
| Vim | Help | Jump to a subject | Ctrl + ] |
| Vim | Navigation | Jump to first character in the line (also: Home key) | 0 |
| Vim | Navigation | Jump back to next cursor position(s) | Ctrl + I |
| Vim | Navigation | Jump back to previous cursor position(s) | Ctrl + O |
| Vim | Navigation | Jump back to previous cursor position(s) | Ctrl + T |
| Vim | Navigation | Jump to first non-blank character in the line | ^ |
| Vim | Navigation | Jump to first character in screen line (differs from 0 when lines wrap) | g0 |
| Vim | Navigation | Jump to middle of the line | gM |
| Vim | Navigation | Jump to first non-blank character in screen line (differs from ^ when lines wrap) | g^ |
| Vim | Navigation | Jump to middle of the screen line | gm |
| Vim | Navigation | Jump to the last character in the line (N-1 lines lower) | n $ |
| Vim | Navigation | Repeat the last f, F, t, or T N times in opposite direction (e.g., 3,) | n , |
| Vim | Navigation | Repeat the last f, F, t, or T N times (e.g., 6;) | n ; |
| Vim | Navigation | Jump to the Nth occurrence of char to the left (e.g., 4Fo) | n F char |
| Vim | Navigation | Jump till before the Nth occurrence of char to the left (e.g., 6Tu) | n T char |
| Vim | Navigation | Jump to column N (default: 1) | n VertBar |
| Vim | Navigation | Jump to the Nth occurrence of char to the right (e.g., 8ft) | n f char |
| Vim | Navigation | Jump to last character in screen line (differs from $ when lines wrap) | n g$ |
| Vim | Navigation | Move n characters to the left (e.g., 5h) | n h |
| Vim | Navigation | Move n lines down (e.g., 3j) | n j |
| Vim | Navigation | Go up N lines (e.g., 4k) | n k |
| Vim | Navigation | Move n lines up (e.g., 3k) | n k |
| Vim | Navigation | Move n characters to the right (e.g., 10l) | n l |
| Vim | Navigation | Jump till before the Nth occurrence of char to the right (e.g., 8tr) | n t char |
| Vim | Windows | Quit Vim | :q |
| Vim | Windows | Quit Vim (without saving) | :qa! |