Vim Cheatsheet
Vim commands organized by mode
Vim Cheatsheet is a free online tool from BrowserUtils that vim commands organized by mode. It runs entirely in your browser — your data never leaves your device. No account required.
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
How to use Vim Cheatsheet
- 1 Paste or type your input into the editor above.
- 2 The tool processes your data instantly — right in your browser, with nothing sent to a server.
- 3 Copy the result with one click or continue editing your input.
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.
Vim Cheatsheet specs
- Runtime
- 100% client-side (browser)
- Cost
- Free — no account, no rate limits, no usage caps
- Browser support
- Chrome 90+, Firefox 88+, Safari 14+, Edge 90+
- Part of
- 299 developer tools on BrowserUtils (100% client-side)
Questions
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.
How do I search and replace in Vim?
Use :%s/old/new/g to replace all occurrences in the file. Add c for confirmation (:%s/old/new/gc). Omit % to replace only on the current line. Use \< and \> for whole-word matching.
How do I undo and redo in Vim?
Press u in Normal mode to undo the last change. Press Ctrl+R to redo. Vim supports unlimited undo history within a session, and you can persist undo history across sessions with the undofile option.
Is this Vim cheatsheet useful for Neovim users?
Yes. Neovim is a fork of Vim and shares the same core keybindings and command syntax. All commands in this cheatsheet work in both Vim and Neovim.
Comments
Related tools
More Developer Reference
ASCII TableHTML Entities ReferenceRegex CheatsheetCSS Selectors ReferenceHTML Color NamesKeyboard KeycodesUnicode TableHTML Tags Reference
View all Developer Reference tools
Comments