Vim keyboard shortcuts

Vim is a language of motions, operators, and modes rather than a list of isolated hotkeys. Start with movement, combine it with editing, then use visual selection and window or file commands.

Vim is easier when you stop treating every key as a separate trick. Learn movement first, combine it with operators, and only then add visual selection, search, and file or window commands.

Motions

Move by character, word, sentence, paragraph, line, or matching delimiter in normal mode.

ActionWindowsmacOSLinux
Next word startwww
Previous word startbbb
Next word endeee
First non-blank of the line^^^
End of the line$$$
Start of the filegggggg
End of the fileGGG
Previous paragraph boundary} moves to the next one.{{{
Jump to matching bracket or paren%%%
Jump to next occurrence of a characterType f then the character. t jumps to just before it; F and T search backwards.fff

Editing

Combine operators with motions, change text, copy and paste, undo, and repeat edits.

ActionWindowsmacOSLinux
Delete the linedddddd
Copy (yank) the lineyyyyyy
Paste after the cursorP pastes before.ppp
Delete the character under the cursorxxx
Undouuu
RedoCtrlrCtrlrCtrlr
Open a new line belowO opens above.ooo
Change the whole word under the cursorThe ci text-object pattern works with other objects: ci( changes inside parentheses.ciwciwciw
Change the whole linecccccc
Repeat the last change...

Windows, files, and ex commands

Ctrl+w prefixes window commands: press Ctrl+w, release, then press the command key.

ActionWindowsmacOSLinux
Split the window horizontallyCtrlwsCtrlwsCtrlws
Split the window verticallyCtrlwvCtrlwvCtrlwv
Move to the window belowh, k, and l move left, up, and right.CtrlwjCtrlwjCtrlwj
Close the current windowCtrlwqCtrlwqCtrlwq
Write the file:w:w:w
Quit:wq writes and quits; :q! quits without saving.:q:q:q
Substitute across the fileFull form: :%s/old/new/g replaces every occurrence in the file.:%s:%s:%s

Make the useful keys stick

Vim does not ask you to memorise a bag of tricks. It asks you to see a movement, an operation, and a mode. Once those pieces connect, the reference becomes a reminder rather than a crutch.

You do not need this whole page in your head. Pick two shortcuts that remove a repeated hand movement, use them until they feel ordinary, and come back for the next pair.

Make a printable sheet for this app