Vim Survival Guide
Enough Vim to edit confidently on any server — modes, motions, and the operator+motion grammar that makes it click.
Modes & saving
- Normal ↔ Insert
iinsert ·aappend ·Escback to normal- Save / quit
:wsave ·:qquit ·:wqboth ·:q!discard- Open a line
obelow ·Oabove (enters insert)- Visual select
vchar ·Vline ·Ctrl-vblock
Move (motions)
- Word / back
wnext word ·bback ·eend of word- Line ends
0start ·^first non-blank ·$end- File
ggtop ·Gbottom ·42Gline 42- Find char in line
f xto next x ·;repeat ·t xtill before x- Match bracket
%jump to matching ( ) { } [ ]
Edit (operator + motion)
- Delete
ddline ·dwword ·d$to end- Change (delete+insert)
cwword ·ciwinner word ·ci"inside quotes- Yank / paste
yycopy line ·ppaste after ·Pbefore- Undo / redo
uundo ·Ctrl-rredo ·.repeat last change- Grammar
- operator + motion:
d+2w= delete 2 words. Composable.
Search & replace
- Search
/textthenn/N·*word under cursor- Replace in file
:%s/old/new/g· confirm each: addc- Clear highlight
:noh