Vim commands
Updated 2026-02-14
Vim keybindings: navigation, editing, search, and ex commands. Quick reference for daily use.
Navigation
h j k lLeft, down, up, right.
w / bNext / previous word start.
0 / ^ / $Line start / first non-blank / line end.
gg / GFirst line / last line.
Ctrl+u / Ctrl+dHalf page up / down.
/pattern / ?patternSearch forward / backward.
n / NNext / previous match.
Editing
i / aInsert before / after cursor.
I / AInsert at line start / end.
o / ONew line below / above.
dd / yyDelete / yank line.
x / XDelete char under / before cursor.
p / PPaste after / before cursor.
u / Ctrl+rUndo / redo.
ci" / ciwChange inside " / word.
Ex commands
:wSave.
:qQuit.
:wq / :xSave and quit.
:q!Quit without saving.
:s/old/new/gSubstitute in line (g = all).
:%s/old/new/gSubstitute in file.
:set numberShow line numbers.
:nohClear search highlight.