Cheatsheet
Every command in the curriculum, filterable and searchable. Click a card to open its example with the editor running.
45 commands
i
Insert before cursor
i then type → INSERT mode
a
Insert after cursor
a → cursor moves one right
o
Open a new line below
o → new blank line + INSERT
O
Open a new line above
O → new blank line above
Esc
Return to NORMAL mode
or Ctrl-[
h j k l
Left, down, up, right
5j → move down 5 lines
┌
┐
└
┘
AD · cheatsheet-native
fluid · In-grid
// google adsense slot
w
Jump to next word
3w → 3 words forward
b
Jump to previous word
b → start of prev word
e
End of word
e → end of current word
0
Start of line
0 → column 1
Ctrl-
First non-blank of line
^ → first real char
$
End of line
$ → last char
gg
Jump to first line
gg → top of file
G
Jump to last line
G or {n}G
f x
Jump forward to char x in line
f( → next (
{
Previous paragraph
{ → up one paragraph
}
Next paragraph
} → down one paragraph
x
Delete character under cursor
x → delete one char
dd
Delete (cut) line
2dd → delete 2 lines
dw
Delete word
d3w → delete 3 words
d$
Delete to end of line
d$ or D
yy
Yank (copy) line
5yy → copy 5 lines
p
Paste after cursor
p → paste below
P
Paste before cursor
P → paste above
u
Undo last change
u u u → keep going
Ctrl-r
Redo (Ctrl-r)
Ctrl-r → redo undone
.
Repeat the last change
. → reapply last edit
r x
Replace char under cursor with x
r$ → replace with $
cw
Change word (delete + INSERT)
cw newword Esc
v
Enter VISUAL (char) mode
v → select chars
V
Enter VISUAL LINE mode
V → select whole lines
Ctrl-v
VISUAL BLOCK (Ctrl-v)
Block-select columns
gv
Reselect last selection
gv → reselect
:w
Save file
:w → write to disk
:q
Quit current window
:q! to force quit
:wq
Save and quit
:wq or ZZ
:e file
Open file in current buffer
:e src/app.py
/text
Search forward
/foo → n / N to cycle
:s/a/b/g
Substitute on current line
:%s/a/b/g for whole file
iw
Inside word
ciw → change a word
aw
Around word (includes space)
daw → delete word + space
i"
Inside double quotes
ci" → change string
i(
Inside parens
di( → delete args
it
Inside HTML/XML tag
cit → change tag contents
ip
Inside paragraph
dip → delete paragraph