⚡ Movement

h  left
j  down
k  up
l  right

w  next word
b  previous word
e  end of word

0       start of line
$       end of line
gg      top of file
G       bottom of file
<number>G go to line <number>

Ctrl + u   half-page up
Ctrl + d   half-page down


✍️ Insert Mode

i   insert before cursor
I   insert at start of line
a   append after cursor
A   append at end of line
o   new line below
O   new line above


🔪 Editing

x      delete character
dd     delete line
dw     delete word
d$     delete to end of line

yy     yank (copy) line
yw     yank (copy) word
p      paste below
P      paste above

u      undo
Ctrl+r redo


🎯 Visual Mode

v      start visual selection
V      select whole line
Ctrl+v block selection

y      copy selection
d      delete selection
> or < indent / unindent


🌳 Searching

/text     search for "text"
n         next match
N         previous match

*         search word under cursor
#         search backward word under cursor


🔁 Replace

r<char>      replace one character
cw           change word (delete + insert)
cc           change line
:s/old/new   replace first match on line
:%s/old/new/g   replace ALL in file


🚪 Save & Exit

:w        save
:q        quit
:wq       save & quit
:q!       force quit without saving