🟢Vim Keyboard Shortcuts
35 essential shortcuts for Vim
Mode Switching
| Shortcut | Action |
|---|---|
| i | Enter Insert mode before cursor |
| a | Enter Insert mode after cursor |
| o | Open new line below and enter Insert mode |
| O | Open new line above and enter Insert mode |
| v | Enter Visual (character) mode |
| V | Enter Visual Line mode |
| Ctrl+v | Enter Visual Block mode |
| Esc | Return to Normal mode |
Navigation
| Shortcut | Action |
|---|---|
| h/j/k/l | Move left / down / up / right |
| w/b | Jump to next / previous word start |
| e | Jump to end of word |
| 0/$ | Jump to start / end of line |
| gg/G | Jump to first / last line of file |
| Ctrl+d/Ctrl+u | Scroll half-page down / up |
| % | Jump to matching bracket |
| f{char} | Jump to next occurrence of {char} on line |
| /{pattern} | Search forward for pattern |
| n/N | Next / previous search result |
| * | Search forward for word under cursor |
Editing
| Shortcut | Action |
|---|---|
| dd | Delete (cut) entire line |
| yy | Yank (copy) entire line |
| p/P | Paste after / before cursor |
| x | Delete character under cursor |
| ciw | Change inner word (delete word, enter Insert) |
| diw | Delete inner word |
| u | Undo last change |
| Ctrl+r | Redo last undone change |
| . (dot) | Repeat last editing command |
| >>/<< | Indent / un-indent line |
Command
| Shortcut | Action |
|---|---|
| :w | Save file |
| :q | Quit Vim |
| :wq/ZZ | Save and quit |
| :s/old/new/g | Substitute all on current line |
| :%s/old/new/g | Substitute all in entire file |
| :e filename | Open file for editing |
About Vim Shortcuts
Vim is a highly configurable, modal text editor built to make editing efficient. Originally released in 1991 as an improved version of the Unix vi editor, Vim uses different modes — Normal, Insert, Visual, and Command-line — each optimized for specific tasks. Vim's modal design means most editing happens without modifier keys, using single keystrokes to navigate, delete, copy, and transform text. Mastering Vim shortcuts dramatically accelerates text editing speed once the initial learning curve is overcome.
This reference covers 35 essential Vim keyboard shortcuts organized across 4 categories: Mode Switching, Navigation, Editing, and more. Each shortcut lists both macOS and Windows/Linux key combinations where applicable, making it easy to find the right key combo regardless of your operating system.
Learning keyboard shortcuts is one of the highest-leverage investments you can make in your daily workflow. Studies show that developers and designers who rely on keyboard shortcuts are measurably faster at common tasks. Rather than memorizing every shortcut at once, focus on the ones you use most frequently and gradually expand your repertoire.
Bookmark this page for quick reference whenever you need to look up a Vim shortcut. The categorized layout makes it easy to find shortcuts by their function, whether you need navigation, editing, or specialized commands.