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.

macOS Windows Linux
121 shortcuts 8 categories
Visit Vim Official Website
Show shortcuts for:

Global 5 shortcuts

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

Cursor movement 44 shortcuts

Move cursor left
H H H
Move cursor down
J J J
Move cursor up
K K K
Move cursor right
L L L
Move cursor down (multi-line text)
G +J G +J G +J
Move cursor up (multi-line text)
G +K G +K G +K
Move to top of screen
Shift +H Shift +H Shift +H
Move to middle of screen
Shift +M Shift +M Shift +M
Move to bottom of screen
Shift +L Shift +L Shift +L
Jump forwards to the start of a word
W W W
Jump forwards to the start of a word (words can contain punctuation)
Shift +W Shift +W Shift +W
Jump forwards to the end of a word
E E E
Jump forwards to the end of a word (words can contain punctuation)
Shift +E Shift +E Shift +E
Jump backwards to the start of a word
B B B
Jump backwards to the start of a word (words can contain punctuation)
Shift +B Shift +B Shift +B
Jump backwards to the end of a word
G +E G +E G +E
Jump backwards to the end of a word (words can contain punctuation)
Shift +G +E Shift +G +E Shift +G +E
Move cursor to matching character (default supported pairs: '()', '{}', '[]')
Shift +5 Shift +5 Shift +5
Jump to the start of the line
0 0 0
Jump to the first non-blank character of the line
Shift +6 Shift +6 Shift +6
Jump to the end of the line
Shift +4 Shift +4 Shift +4
Jump to the last non-blank character of the line
G +_ G +_ G +_
Go to the first line of the document
G +G G +G G +G
Go to the last line of the document
Shift +G Shift +G Shift +G
Go to line 5
5 +G +G 5 +G +G 5 +G +G
Move to local declaration
G +D G +D G +D
Move to global declaration
Shift +G +D Shift +G +D Shift +G +D
Jump to next occurrence of character x
F +X F +X F +X
Jump to before next occurrence of character x
T +X T +X T +X
Jump to the previous occurrence of character x
Shift +F +X Shift +F +X Shift +F +X
Jump to after previous occurrence of character x
Shift +T +X Shift +T +X Shift +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 +Z Z +Z Z +Z
Position cursor on top of the screen
Z +T Z +T Z +T
Position cursor on bottom of the screen
Z +B Z +B Z +B
Move screen down one line (without moving cursor)
Ctrl +E Ctrl +E Ctrl +E
Move screen up one line (without moving cursor)
Ctrl +Y Ctrl +Y Ctrl +Y
Move screen up one page (cursor to last line)
Ctrl +B Ctrl +B Ctrl +B
Move screen down one page (cursor to first line)
Ctrl +F Ctrl +F Ctrl +F
Move cursor and screen down 1/2 page
Ctrl +D Ctrl +D Ctrl +D
Move cursor and screen up 1/2 page
Ctrl +U Ctrl +U Ctrl +U

Insert mode - inserting/appending text 18 shortcuts

Insert before the cursor
I I I
Insert at the beginning of the line
Shift +I Shift +I Shift +I
Insert (append) after the cursor
A A A
Insert (append) at the end of the line
Shift +A Shift +A Shift +A
Append (open) a new line below the current line
O O O
Append (open) a new line above the current line
Shift +O Shift +O Shift +O
Insert (append) at the end of the word
E +A E +A E +A
Delete the character before the cursor during insert mode
Ctrl +H Ctrl +H Ctrl +H
Delete word before the cursor during insert mode
Ctrl +W Ctrl +W Ctrl +W
Add a line break at the cursor position during insert mode
Ctrl +J Ctrl +J Ctrl +J
Indent (move right) line one shiftwidth during insert mode
Ctrl +T Ctrl +T Ctrl +T
De-indent (move left) line one shiftwidth during insert mode
Ctrl +D Ctrl +D Ctrl +D
Insert (auto-complete) next match before the cursor during insert mode
Ctrl +N Ctrl +N Ctrl +N
Insert (auto-complete) previous match before the cursor during insert mode
Ctrl +P Ctrl +P Ctrl +P
Insert the contents of register x
Ctrl +R +X Ctrl +R +X Ctrl +R +X
Temporarily enter normal mode to issue one normal-mode command x
Ctrl +O +X Ctrl +O +X Ctrl +O +X
Exit insert mode
Esc Esc Esc
Exit insert mode
Ctrl +C Ctrl +C Ctrl +C
The BuildBox Macropad Puts Keyboard Shortcuts at Your Fingertips! Learn More

Editing 21 shortcuts

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

Marking text (visual mode) 14 shortcuts

Start visual mode, mark lines, then do a command (like y-yank)
V V V
Start linewise visual mode
Shift +V Shift +V Shift +V
Move to other end of marked area
O O O
Start visual block mode
Ctrl +V Ctrl +V Ctrl +V
Move to other corner of block
Shift +O Shift +O Shift +O
Mark a word
A +W A +W A +W
Mark a block with ()
A +B A +B A +B
Mark a block with {}
Shift +A +B Shift +A +B Shift +A +B
Mark a block with <> tags
A +T A +T A +T
Mark inner block with ()
I +B I +B I +B
Mark inner block with {}
Shift +I +B Shift +I +B Shift +I +B
Mark inner block with <> tags
I +T I +T I +T
Exit visual mode
Esc Esc Esc
Exit visual mode
Ctrl +C Ctrl +C Ctrl +C

Visual commands 7 shortcuts

Shift text right
Shift +. Shift +. Shift +.
Shift text left
Shift +, Shift +, Shift +,
Yank (copy) marked text
Y Y Y
Delete marked text
D D D
Switch case
Shift +` Shift +` Shift +`
Change marked text to lowercase
U U U
Change marked text to uppercase
Shift +U Shift +U Shift +U

Registers 5 shortcuts

Show registers content
Shift +; +R Shift +; +R Shift +; +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 positions 7 shortcuts

List of marks
Shift +; +M Shift +; +M Shift +; +M
Set current position for mark A
M +A M +A M +A
Jump to position of mark A
` +A ` +A ` +A
Yank text to position of mark A
Y +` +A Y +` +A Y +` +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
` +. ` +. ` +.
BuildBox Macropad

We've Built 10s Of 1000s Of Keyboard Shortcuts Into The BuildBox Macropad

The BuildBox Macropad is the ultimate shortcut machine. One device with up to 160 configurable shortcuts for apps like Vim available at your fingertips, a crystal clear display showing what every key does, and a hall-effect scroll wheel for scrubbing through video, audio and graphic editing applications like butter!

Drop your email below to be eligible for our first production run of 500 BuildBox units, at a HUGE discount price:

Keyboard Shortcuts for Similar Applications