Vim Keyboard Shortcuts

Vim keyboard shortcut reference covering 55 bindings for Windows, Mac & Linux. Commonly searched bindings include Move Left, Move Down, and Move Up. 55 of 55 shortcuts are verified against official Vim documentation, each with a linked source when available. Search by action name, filter by category, look up what a key combination does, print a cheat sheet, or practice with flashcards.

Official Vim documentation

Editing

ActionDescriptionWindowsMacVerifiedSource
Delete Line Delete current line dd dd Yes Source
Yank Line Copy current line yy yy Yes Source
Paste After Paste after cursor P P Yes Source
Paste Before Paste before cursor P P Yes Source
Undo Undo last change U U Yes Source
Redo Redo undone change Ctrl+R Ctrl+R Yes Source
Delete Char Delete character under cursor X X Yes Source
Replace Char Replace character under cursor R R Yes Source
Change Inner Word Change word under cursor ciw ciw Yes Source
Change Around Word Change word including space caw caw Yes Source
Delete Inside Quotes Delete inside double quotes D+I+" D+I+" Yes Source
Delete Around Quotes Delete including double quotes D+A+" D+A+" Yes Source
Repeat Last Repeat last command . . Yes Source
Join Lines Join current and next line J J Yes Source
Toggle Case Toggle character case ~ ~ Yes Source
Insert Before Enter insert mode before cursor I I Yes Source
Append Enter insert mode after cursor A A Yes Source
Open Below Open line below and insert O O Yes Source
Open Above Open line above and insert O O Yes Source
Delete Word Back Delete word before cursor in insert Ctrl+W Ctrl+W Yes Source
Delete Line Back Delete to start of line in insert Ctrl+U Ctrl+U Yes Source

File

ActionDescriptionWindowsMacVerifiedSource
Save and Quit Write and quit ZZ ZZ Yes Source
Quit Without Save Quit without saving ZQ ZQ Yes Source
Write File Save current file :w :w Yes Source
Quit Quit Vim :q :q Yes Source
Write and Quit Save and exit :wq :wq Yes Source
Save and Exit Save and exit (alt) :x :x Yes Source
Edit File Open another file :e :e Yes Source

General

ActionDescriptionWindowsMacVerifiedSource
Exit Insert Return to normal mode Escape Escape Yes Source

Navigation

ActionDescriptionWindowsMacVerifiedSource
Move Left Move cursor left H H Yes Source
Move Down Move cursor down J J Yes Source
Move Up Move cursor up K K Yes Source
Move Right Move cursor right L L Yes Source
Next Word Move to start of next word W W Yes Source
Previous Word Move to start of previous word B B Yes Source
End of Word Move to end of word E E Yes Source
Line Start Move to beginning of line 0 0 Yes Source
Line End Move to end of line $ $ Yes Source
File Start Go to first line gg gg Yes Source
File End Go to last line G G Yes Source
Jump Bracket Jump to matching bracket % % Yes Source

Search

ActionDescriptionWindowsMacVerifiedSource
Search Word Search word under cursor * * Yes Source
Next Match Go to next search match N N Yes Source
Previous Match Go to previous search match N N Yes Source
Search Forward Search forward / / Yes Source
Search Backward Search backward ? ? Yes Source
Clear Highlight Clear search highlighting :noh :noh Yes Source

View

ActionDescriptionWindowsMacVerifiedSource
Half Page Down Scroll half page down Ctrl+D Ctrl+D Yes Source
Half Page Up Scroll half page up Ctrl+U Ctrl+U Yes Source
Center Line Center cursor on screen zz zz Yes Source
Line Numbers Toggle line numbers :set number :set number Yes Source

Window

ActionDescriptionWindowsMacVerifiedSource
Vertical Split Split window vertically :vs :vs Yes Source
Horizontal Split Split window horizontally :sp :sp Yes Source
New Tab Open new tab :tabnew :tabnew Yes Source
Close Buffer Close current buffer :bd :bd Yes Source

← All apps on Shortcut Atlas

Loading Shortcut Atlas…