Vim & Neovim Editor Commands Cheat Sheet
The definitive Vim quick reference: normal/insert/visual modes, search and replace (:%s), buffer splits, and essential save/quit commands with 1-click copy.
Cursor Movement (7 commands)
h, j, k, l
h (left), j (down), k (up), l (right). Faster than arrow keys in normal mode.
w / b
w jumps forward to start of next word. b jumps backward to start of previous word.
e
Jumps cursor to the end of the current or next word.
0 / $
0 jumps to the first character of the line. $ jumps to the very end of the line.
^
Jumps to the first non-whitespace character on the current line.
gg / G
gg navigates to line 1. G navigates to the final line of the document.
Ctrl + d / Ctrl + u
Ctrl+d scrolls down half screen. Ctrl+u scrolls up half screen.
Inserting & Modes (7 commands)
i
Enters Insert Mode immediately before the current cursor position.
a
Enters Insert Mode immediately after the current cursor position.
A
Jumps to the end of the current line and enters Insert Mode.
o / O
o inserts a blank line below. O inserts a blank line above current line.
v
Enters Visual Mode to select characters with motion keys.
V
Enters Visual Line Mode to select whole lines at once.
Ctrl + v
Enters Visual Block Mode for vertical column editing across multiple lines.
Editing & Clipboard (7 commands)
x
Deletes character under cursor and copies it to the default register.
dd
Deletes the current line and copies it to the clipboard register.
dw
Deletes from current cursor position to the start of the next word.
cw
Deletes word and immediately enters Insert Mode to type replacement.
yy
Copies the current line into memory without deleting it.
p / P
p pastes copied/deleted text after cursor. P pastes before cursor.
u / Ctrl + r
u undoes the previous edit. Ctrl+r redoes the undone change.
Search & Replace (3 commands)
/pattern
Searches forward for pattern. Press n for next match, N for previous.
:%s/old/new/g
Replaces all occurrences of "old" with "new" throughout the entire file.
:%s/old/new/gc
Prompts confirmation (y/n/a/q) before replacing each match.
Saving & Exiting (4 commands)
:w
Writes buffer changes directly to disk.
:wq or ZZ
Saves all changes and terminates the Vim editor session.
:q!
Discards all unsaved modifications and exits Vim immediately.
:sp / :vsp
:sp opens horizontal split. :vsp opens vertical side-by-side split.