Keyboard Walk

Every normal-mode key, organized by physical key location.

A row-by-row tour of the QWERTY keyboard: every unshifted key, every shifted key, with a note on Ctrl- variants. Useful as a wall poster and as a study plan.

Vim's bindings cover every key on the keyboard. Not most of them. Not the popular ones. Every key. Hold a finger over almost any character on a QWERTY keyboard, hit it in normal mode, and something happens โ€” a motion, an operator, a prefix into a family of commands, a jump, an action. The empty key is the exception, not the rule.

That's also a study plan. You don't have to learn Vim's grammar all at once โ€” you can walk the keyboard. Pick a key a day, hit it in normal mode, see what it does, look it up. After a few weeks the unshifted letters are second nature. Then shifted letters. Then shifted symbols. Then a handful of useful Ctrl- variants. By the time you've finished one full lap of the keyboard, you've absorbed essentially every common normal-mode command in Vim.

The order of importance: 1. Unshifted keys โ€” the bulk of day-to-day editing. Motions (hjkl, w, b, e, f, t), operators (d, c, y), modes (i, a, o, v, :), basic editing (u, x, p, r, s). 2. Shifted keys โ€” bigger, opposite, or specialised siblings of the unshifted versions. A appends at end of line, O opens above, I inserts at first non-blank, N reverses search, G jumps to last line. 3. Shifted symbols โ€” search-word-under-cursor (*, #), sentence motions ((, )), paragraph motions ({, }), indent operators (>, <), end-of-line ($), bracket-match (%). 4. Ctrl- variants โ€” window prefixes (Ctrl-Wโ€ฆ), scrolling (Ctrl-D, Ctrl-U, Ctrl-F, Ctrl-B), the jumplist (Ctrl-O, Ctrl-I), inc/dec (Ctrl-A, Ctrl-X), redo (Ctrl-R), file-info (Ctrl-G). A full reference of every Ctrl- key lives in Complete Key Reference.

Pass 1 โ€” Unshifted keys

Tilde row

Key Function
` Jump to mark (precise column) โ€” `a jumps to mark a, `` to last position

Number row

Key Function
1 โ€ฆ 9 Count prefix (e.g. 5j = down 5 lines)
0 Start of line (column 0)
- Up to first non-blank of previous line
= Re-indent operator (== line, =+motion range, =ap paragraph)

Top letter row

Key Function
q Record macro into register (qaโ€ฆq); replay with @a
w Word forward (motion)
e End of word (motion)
r Replace one character
t Till char on line (motion โ€” stops before match)
y Yank operator (copy)
u Undo
i Insert before cursor
o Open new line below and insert
p Paste after cursor
[ Backward-prefix family ([c prev hunk, [m prev method, [{ prev {)
] Forward-prefix family (]c, ]m, ]})
\ Default <Leader> in most configs (custom mappings)

Home row

Key Function
a Append after cursor
s Substitute one character (delete + insert)
d Delete operator (cut)
f Find char on line forward (motion โ€” lands on match)
g Prefix family (gg, gd, gf, gv, gU, gu, g~, gq, โ€ฆ)
h Left
j Down
k Up
l Right
; Repeat last f/F/t/T in same direction
' Jump to mark (line, first non-blank) โ€” 'a jumps to mark a, '' to last position

Bottom row

Key Function
z Prefix family (zz centre, zt top, zb bottom, zf fold, zo/zc open/close fold, zM/zR close/open all)
x Delete char under cursor
c Change operator (delete + enter insert mode)
v Visual mode (charwise)
b Word backward (motion)
n Next search match
m Set mark (ma marks current position as a)
, Reverse-repeat last f/F/t/T
. Repeat last change (the killer feature)
/ Search forward

Special keys (no shift, no row)

Key Function
Esc Cancel / return to normal mode
Enter Down to first non-blank of next line (same as +)
Space Right one column (same as l)
Backspace Left one column (same as h)
Tab Next jumplist entry (same as Ctrl-I)

Pass 2 โ€” Shifted keys

Once the unshifted keys feel automatic, walk the keyboard again with shift held. The pattern: shifted-letter = bigger / opposite / line-flavored version of its unshifted counterpart. Shifted-number = a punctuation symbol with its own meaning. Shifted-punctuation = often a paired motion or an operator.

Tilde row

Key Function
~ Toggle case of character under cursor (advances cursor)

Shifted number row

Key Function
! Filter operator โ€” run buffer range through external shell command (!ap)
@ Play macro from register (@a plays register a, @@ replays last)
# Search backward for word under cursor
$ End of line
% Jump to matching (/)/[/]/{/}; also %-range in Ex
^ First non-blank of line
& Repeat last :s substitution on current line
* Search forward for word under cursor
( Sentence backward
) Sentence forward
_ Down to first non-blank (same as -, but next line)
+ Down to first non-blank of next line (same as Enter)

Shifted top letter row

Key Function
Q In Neovim: replay last macro. In classic Vim: enter ex mode
W WORD forward (whitespace-delimited, vs lowercase w word-delimited)
E End of WORD
R Enter replace mode (overwrite as you type)
T Till char backward
Y Yank line (classic Vim) / yank to end of line (Neovim default)
U Undo all changes on current line (rarely used)
I Insert at first non-blank of line
O Open new line above and insert
P Paste before cursor
{ Paragraph backward
} Paragraph forward
| Go to column N (5| = column 5)

Shifted home row

Key Function
A Append at end of line
S Substitute whole line (delete + insert)
D Delete to end of line
F Find char on line backward
G Go to last line (5G = line 5)
H Top of screen (high)
J Join current line with next
K Lookup keyword under cursor (man, :help, or LSP hover)
L Bottom of screen (low)
: Enter command-line mode โ€” type an Ex command
" Register prefix ("ap paste from register a, "+y yank to system clipboard)

Shifted bottom row

Key Function
Z Save/quit prefix (ZZ save + quit, ZQ quit without saving)
X Delete char before cursor
C Change to end of line
V Visual-line mode
B WORD backward
N Previous search match
M Middle of screen
< Dedent operator (<< line, <+motion range)
> Indent operator (>> line, >+motion range)
? Search backward

Pass 3 โ€” Ctrl- variants

Most letters also have a Ctrl- variant. Many of them are useful, a handful are essential, and a few do nothing in normal mode at all. The most worthwhile to learn:

Key Function
Ctrl-W Window prefix (Ctrl-Wh/j/k/l navigate, Ctrl-Ws/v split, Ctrl-Wc close, โ€ฆ)
Ctrl-R Redo (undo of undo)
Ctrl-D Scroll half-page down
Ctrl-U Scroll half-page up
Ctrl-F Scroll full page forward
Ctrl-B Scroll full page backward
Ctrl-E Scroll one line down (cursor stays)
Ctrl-Y Scroll one line up (cursor stays)
Ctrl-O Jumplist backward โ€” return to previous cursor location
Ctrl-I Jumplist forward (same key as Tab)
Ctrl-A Increment number under or after cursor
Ctrl-X Decrement number under or after cursor
Ctrl-G Show file info (path, line number, total lines)
Ctrl-] Jump to tag under cursor (or LSP definition with plugin)
Ctrl-T Jump back from tag
Ctrl-V Visual-block mode (column selection)

Every other Ctrl- combination โ€” including the obscure and the rarely-useful โ€” is catalogued in Complete Key Reference. When in doubt about what Ctrl-X, say, does in some context, look it up there.

See also: Complete Key Reference