← Back📝
VIM Command Cheat Sheet
Search useful VIM commands for navigation, editing, visual mode, search and ex commands.
Navigation
h j k lMove left/down/up/right
w / bNext/prev word
0 / $Start/end of line
gg / GTop/bottom of file
Ctrl+f / Ctrl+bPage down/up
% Jump to matching bracket
Insert Mode
iInsert before cursor
aInsert after cursor
oNew line below
ONew line above
IInsert at line start
AInsert at line end
EscReturn to normal mode
Editing
ddDelete line
yyYank (copy) line
p / PPaste after/before
uUndo
Ctrl+rRedo
.Repeat last command
ccChange entire line
cwChange word
xDelete character
Visual Mode
vVisual mode (char)
VVisual line mode
Ctrl+vVisual block mode
yYank selection
dDelete selection
> / <Indent / unindent
Search & Replace
/patternSearch forward
?patternSearch backward
n / NNext/prev match
:%s/old/new/gReplace all in file
:s/old/new/gReplace in line
:nohClear search highlight
File & Quit
:wSave file
:qQuit
:wq / ZZSave and quit
:q!Quit without saving
:e filenameOpen file
:split / :vsplitSplit window