Vim Cheatsheet — Essential Commands for Developers

Vim commands reference: navigation, editing, search, visual mode, macros, splits, buffers. From beginner to pro.

Modes

KeyMode
iInsert mode (before cursor)
aInsert mode (after cursor)
EscNormal mode
vVisual mode (select)
VVisual line mode
:Command mode

Navigation

KeyAction
h j k lLeft, Down, Up, Right
w / bNext / previous word
0 / $Start / end of line
gg / GStart / end of file
Ctrl+d / Ctrl+uHalf page down / up
{ / }Previous / next paragraph
:42Go to line 42

Editing

KeyAction
ddDelete line
yyYank (copy) line
p / PPaste after / before
uUndo
Ctrl+rRedo
ciwChange inner word
ci"Change inside quotes
diwDelete inner word
.Repeat last change

Search & Replace

/pattern        # Search forward
?pattern        # Search backward
n / N           # Next / previous match
:%s/old/new/g   # Replace all in file
:%s/old/new/gc  # Replace all with confirmation

Save & Quit

CommandAction
:wSave
:qQuit
:wqSave and quit
:q!Quit without saving
ZZSave and quit (shortcut)

Need These Tools as an API?

TextForge API offers 20+ developer toolkit endpoints. Free tier: 50 requests/day.

Try TextForge API Free →

Related Tools