Vim Cheatsheet
// Vim commands organized by mode
iEnter Insert mode (before cursor)
IEnter Insert mode (beginning of line)
aEnter Insert mode (after cursor)
AEnter Insert mode (end of line)
oOpen new line below and enter Insert mode
OOpen new line above and enter Insert mode
vEnter Visual mode (character)
VEnter Visual mode (line)
Ctrl+vEnter Visual Block mode
EscReturn to Normal mode
:Enter Command-line mode
REnter Replace mode
h / j / k / lLeft / Down / Up / Right
wJump to start of next word
WJump to start of next WORD (whitespace-delimited)
bJump to start of previous word
BJump to start of previous WORD
eJump to end of current/next word
0Jump to beginning of line
^Jump to first non-blank character
$Jump to end of line
ggGo to first line of document
GGo to last line of document
<n>GGo to line n
Ctrl+fPage down (forward)
Ctrl+bPage up (backward)
Ctrl+dHalf page down
Ctrl+uHalf page up
{Jump to previous paragraph
}Jump to next paragraph
%Jump to matching bracket
H / M / LTop / Middle / Bottom of screen
zzCenter current line on screen
xDelete character under cursor
XDelete character before cursor
ddDelete (cut) current line
dwDelete from cursor to end of word
d$ / DDelete from cursor to end of line
d0Delete from cursor to beginning of line
dGDelete from cursor to end of file
ccChange (replace) entire line
cwChange from cursor to end of word
c$ / CChange from cursor to end of line
r<char>Replace single character
JJoin current line with next line
uUndo
Ctrl+rRedo
.Repeat last change
~Toggle case of character
>>Indent line
<<Unindent line
==Auto-indent line
yyYank (copy) current line
ywYank from cursor to end of word
y$Yank from cursor to end of line
pPaste after cursor
PPaste before cursor
"<reg>yYank into register (a-z)
"<reg>pPaste from register
"+yYank to system clipboard
"+pPaste from system clipboard
:regShow all registers
/patternSearch forward for pattern
?patternSearch backward for pattern
nRepeat search in same direction
NRepeat search in opposite direction
*Search forward for word under cursor
#Search backward for word under cursor
:s/old/new/Replace first occurrence on line
:s/old/new/gReplace all occurrences on line
:%s/old/new/gReplace all in entire file
:%s/old/new/gcReplace all with confirmation
:nohClear search highlighting
:wSave file
:w <file>Save as new file
:qQuit (fails if unsaved changes)
:q!Quit without saving
:wq / :x / ZZSave and quit
:e <file>Open file for editing
:e!Revert to saved version
:bn / :bpNext / Previous buffer
:lsList open buffers
:sp <file>Horizontal split
:vsp <file>Vertical split
Ctrl+w wSwitch between splits
Ctrl+w qClose current split
:tabnew <file>Open file in new tab
gt / gTNext / Previous tab
maSet mark "a" at current position
`aJump to mark "a"
:marksList all marks
qaStart recording macro into register "a"
qStop recording macro
@aPlay macro from register "a"
@@Repeat last played macro
10@aPlay macro 10 times
#About Vim Cheatsheet
Free online Vim cheatsheet. Quick reference for Vim commands organized by mode: normal, insert, visual, and command-line. Includes navigation, editing, search, and file operations. This tool runs entirely in your browser — your data is never sent to a server. Just paste your input, get instant results, and copy with one click. No sign-up or installation required.
#FAQ
What are the Vim modes? ▾
Vim has four main modes: Normal mode (default, for navigation and commands), Insert mode (for typing text, entered with i/a/o), Visual mode (for selecting text, entered with v/V/Ctrl+v), and Command-line mode (for ex commands, entered with :).
How do I exit Vim? ▾
In Normal mode, type :q to quit (fails if unsaved changes), :q! to force quit without saving, :wq or :x to save and quit, or ZZ to save and quit. If in Insert mode, press Escape first to return to Normal mode.
</> Embed this tool ▾
Copy this code to embed the tool on your website. Adjust the height to fit your layout.
<iframe src="https://www.browserutils.dev/embed/vim-cheatsheet" width="100%" height="500" frameborder="0" title="Vim Cheatsheet"></iframe>