1. Home
  2. Keyboard Shortcuts
  3. Vim
Code Editors & IDEs

Vim Keyboard Shortcuts

121 keyboard shortcuts to help you edit text with modal efficiency faster in Vim

Vim keyboard shortcuts

Vim is a code editors & IDEs application developed by Bram Moolenaar. It lets users edit text with modal efficiency with a professional-grade toolset.

Learning keyboard shortcuts in Vim can dramatically speed up repetitive tasks and free you to focus on the creative work that matters.

Vim runs on macOS, Windows, and Linux. Regardless of your OS, committing its shortcuts to memory will make you noticeably more productive.

macOSWindowsLinux 121 SHORTCUTS 8 CATEGORIES
VISIT VIM OFFICIAL WEBSITE ↗
SHOW SHORTCUTS FOR:
Jump to Section (8 sections)

Global5 SHORTCUTS

Open help for keyword Shift+;+HShift+;+HShift+;+H
Save file as Shift+;+SShift+;+SShift+;+S
Close current pane Shift+;+CShift+;+CShift+;+C
Open a terminal window Shift+;+TShift+;+TShift+;+T
Open man page for word under the cursor Shift+KShift+KShift+K

Cursor movement44 SHORTCUTS

Move cursor left HHH
Move cursor down JJJ
Move cursor up KKK
Move cursor right LLL
Move cursor down (multi-line text) G+JG+JG+J
Move cursor up (multi-line text) G+KG+KG+K
Move to top of screen Shift+HShift+HShift+H
Move to middle of screen Shift+MShift+MShift+M
Move to bottom of screen Shift+LShift+LShift+L
Jump forwards to the start of a word WWW
Jump forwards to the start of a word (words can contain punctuation) Shift+WShift+WShift+W
Jump forwards to the end of a word EEE
Jump forwards to the end of a word (words can contain punctuation) Shift+EShift+EShift+E
Jump backwards to the start of a word BBB
Jump backwards to the start of a word (words can contain punctuation) Shift+BShift+BShift+B
Jump backwards to the end of a word G+EG+EG+E
Jump backwards to the end of a word (words can contain punctuation) Shift+G+EShift+G+EShift+G+E
Move cursor to matching character (default supported pairs: '()', '{}', '[]') Shift+5Shift+5Shift+5
Jump to the start of the line 000
Jump to the first non-blank character of the line Shift+6Shift+6Shift+6
Jump to the end of the line Shift+4Shift+4Shift+4
Jump to the last non-blank character of the line G+_G+_G+_
Go to the first line of the document G+GG+GG+G
Go to the last line of the document Shift+GShift+GShift+G
Go to line 5 5+G+G5+G+G5+G+G
Move to local declaration G+DG+DG+D
Move to global declaration Shift+G+DShift+G+DShift+G+D
Jump to next occurrence of character x F+XF+XF+X
Jump to before next occurrence of character x T+XT+XT+X
Jump to the previous occurrence of character x Shift+F+XShift+F+XShift+F+X
Jump to after previous occurrence of character x Shift+T+XShift+T+XShift+T+X
Repeat previous f, t, F or T movement ;;;
Repeat previous f, t, F or T movement, backwards ,,,
Jump to next paragraph (or function/block, when editing code) ]]]
Jump to previous paragraph (or function/block, when editing code) [[[
Center cursor on screen Z+ZZ+ZZ+Z
Position cursor on top of the screen Z+TZ+TZ+T
Position cursor on bottom of the screen Z+BZ+BZ+B
Move screen down one line (without moving cursor) Ctrl+ECtrl+ECtrl+E
Move screen up one line (without moving cursor) Ctrl+YCtrl+YCtrl+Y
Move screen up one page (cursor to last line) Ctrl+BCtrl+BCtrl+B
Move screen down one page (cursor to first line) Ctrl+FCtrl+FCtrl+F
Move cursor and screen down 1/2 page Ctrl+DCtrl+DCtrl+D
Move cursor and screen up 1/2 page Ctrl+UCtrl+UCtrl+U

Insert mode - inserting/appending text18 SHORTCUTS

Insert before the cursor III
Insert at the beginning of the line Shift+IShift+IShift+I
Insert (append) after the cursor AAA
Insert (append) at the end of the line Shift+AShift+AShift+A
Append (open) a new line below the current line OOO
Append (open) a new line above the current line Shift+OShift+OShift+O
Insert (append) at the end of the word E+AE+AE+A
Delete the character before the cursor during insert mode Ctrl+HCtrl+HCtrl+H
Delete word before the cursor during insert mode Ctrl+WCtrl+WCtrl+W
Add a line break at the cursor position during insert mode Ctrl+JCtrl+JCtrl+J
Indent (move right) line one shiftwidth during insert mode Ctrl+TCtrl+TCtrl+T
De-indent (move left) line one shiftwidth during insert mode Ctrl+DCtrl+DCtrl+D
Insert (auto-complete) next match before the cursor during insert mode Ctrl+NCtrl+NCtrl+N
Insert (auto-complete) previous match before the cursor during insert mode Ctrl+PCtrl+PCtrl+P
Insert the contents of register x Ctrl+R+XCtrl+R+XCtrl+R+X
Temporarily enter normal mode to issue one normal-mode command x Ctrl+O+XCtrl+O+XCtrl+O+X
Exit insert mode EscEscEsc
Exit insert mode Ctrl+CCtrl+CCtrl+C
The BuildBox Macropad Puts Keyboard Shortcuts at Your Fingertips! LEARN MORE →

Editing21 SHORTCUTS

Replace a single character RRR
Replace more than one character, until ESC is pressed Shift+RShift+RShift+R
Join line below to the current one with one space in between Shift+JShift+JShift+J
Join line below to the current one without space in between Shift+G+JShift+G+JShift+G+J
Reflow paragraph G+W+I+PG+W+I+PG+W+I+P
Switch case up to motion Shift+G+`Shift+G+`Shift+G+`
Change to lowercase up to motion G+UG+UG+U
Change to uppercase up to motion Shift+G+UShift+G+UShift+G+U
Change (replace) entire line C+CC+CC+C
Change (replace) to the end of the line Shift+C+4Shift+C+4Shift+C+4
Change (replace) to the end of the line Shift+CShift+CShift+C
Change (replace) entire word C+I+WC+I+WC+I+W
Change (replace) to the end of the word C+WC+WC+W
Change (replace) to the end of the word C+EC+EC+E
Delete character and substitute text (same as cl) SSS
Delete line and substitute text (same as cc) Shift+SShift+SShift+S
Transpose two letters (delete and paste) X+PX+PX+P
Undo UUU
Restore (undo) last changed line Shift+UShift+UShift+U
Redo Ctrl+RCtrl+RCtrl+R
Repeat last command ...

Marking text (visual mode)14 SHORTCUTS

Start visual mode, mark lines, then do a command (like y-yank) VVV
Start linewise visual mode Shift+VShift+VShift+V
Move to other end of marked area OOO
Start visual block mode Ctrl+VCtrl+VCtrl+V
Move to other corner of block Shift+OShift+OShift+O
Mark a word A+WA+WA+W
Mark a block with () A+BA+BA+B
Mark a block with {} Shift+A+BShift+A+BShift+A+B
Mark a block with <> tags A+TA+TA+T
Mark inner block with () I+BI+BI+B
Mark inner block with {} Shift+I+BShift+I+BShift+I+B
Mark inner block with <> tags I+TI+TI+T
Exit visual mode EscEscEsc
Exit visual mode Ctrl+CCtrl+CCtrl+C

Visual commands7 SHORTCUTS

Shift text right Shift+.Shift+.Shift+.
Shift text left Shift+,Shift+,Shift+,
Yank (copy) marked text YYY
Delete marked text DDD
Switch case Shift+`Shift+`Shift+`
Change marked text to lowercase UUU
Change marked text to uppercase Shift+UShift+UShift+U

Registers5 SHORTCUTS

Show registers content Shift+;+RShift+;+RShift+;+R
Yank into register x '+X+Y'+X+Y'+X+Y
Paste contents of register x '+X+P'+X+P'+X+P
Yank into the system clipboard register '+++Y'+++Y'+++Y
Paste from the system clipboard register '+++P'+++P'+++P

Marks and positions7 SHORTCUTS

List of marks Shift+;+MShift+;+MShift+;+M
Set current position for mark A M+AM+AM+A
Jump to position of mark A `+A`+A`+A
Yank text to position of mark A Y+`+AY+`+AY+`+A
Go to the position where Vim was previously exited `+0`+0`+0
Go to the position when last editing this file `+'`+'`+'
Go to the position of the last change in this file `+.`+.`+.

Noticed errors or keyboard shortcuts that don't work? Please let us know about them here →

The BuildBox Macropad Unlocks Thousands of Keyboard Shortcuts For Any App

The BuildBox Macropad
Available early December

That's why the BuildBox Macropad is the Ultimate Shortcut Machine. One device with infinite shortcuts available at your fingertips, plus a HUGE display showing what each key does, and a magnet-powered zero-friction scroll wheel that moves through documents, video, audio and graphic editing apps like butter!

Enter your Email to get your hands on a launch batch BuildBox (limited: 200 available):

Keyboard Shortcuts for Similar Applications