Navigation — Normal Mode
hjkl
Move left / down / up / right
w/b
Jump forward / backward by word
e
Jump to end of word
0/$
Start / end of line
^
First non-blank char of line
gg/G
Top / bottom of document
{/}
Previous / next paragraph
H/M/L
Top / Middle / Bottom of screen
Ctrlu
Scroll half page up
Ctrld
Scroll half page down
Ctrlf
Scroll full page down
Ctrlb
Scroll full page up
%
Jump to matching bracket
*/#
Search word under cursor fwd / bwd
Editing & Manipulating
i
Insert before cursor
I
Insert at start of line
a
Append after cursor
A
Append at end of line
o/O
New line below / above
x
Delete character under cursor
X
Delete character before cursor
dd
Delete current line
dw
Delete word
D
Delete to end of line
cc
Change (delete) whole line → insert
cw
Change word
r
Replace single character
R
Replace mode (overwrite)
u
Undo
Ctrlr
Redo
.
Repeat last change
y
Yank (copy)
yy
Yank current line
p/P
Paste after / before cursor
~
Toggle case of character
J
Join line with line below
Visual Mode
v
Visual mode (character-wise)
V
Visual line mode
Ctrlv
Visual block mode
gv
Reselect last visual selection
o
Move to other end of selection
d
Delete selection
y
Yank (copy) selection
c
Change (delete + insert) selection
>/<
Indent / dedent selection
U/u
Uppercase / lowercase selection
Search & Commands
/
Search forward
?
Search backward
n/N
Next / previous search result
:w
Write (save) file
:q
Quit
:wq
Save and quit
:q!
Quit without saving
:x
Save and quit (only if changed)
:e file
Open file
:vs
Vertical split
:sp
Horizontal split
:s/a/b/g
Substitute a → b on line
:%s/a/b/g
Substitute a → b whole file
:set nu
Show line numbers
Ctrlg
Show file info + cursor position
Splits & Tabs
Ctrlww
Switch to next split
Ctrlwh/j/k/l
Navigate splits
Ctrlw=
Equal size all splits
Ctrlwq
Close current split
:tabnew
New tab
gt/gT
Next / previous tab
:tabc
Close current tab
Operator + Motion Combos
3j
Move down 3 lines
5dd
Delete 5 lines
ci"
Change inside "quotes"
ca(
Change around (parens)
di{
Delete inside {braces}
yi[
Yank inside [brackets]
yG
Yank from cursor to bottom
dgg
Delete from cursor to top
vip
Select inner paragraph
gqip
Reformat inner paragraph
=G
Auto-indent to end of file