Vim shortcuts have been a learning curve for me personally. Just mastering a few Vim shortcut keys has quickly led to greater productivity and achievements. You won’t need a mouse while moving around Vim. Because everything in Vim can be done with the help of Vim keyboard shortcuts.
List of Vim Shortcuts
Vim being a text editor you need to apply all your brainpower in coding rather than wasting it over how to use the mouse and keyboard simultaneously. Despite various rich text editors, familiarity with Vim will help every Linux user. Given below is the list of VIM shortcuts for Linux users. You can even download this list in the form of a PDF.
Editing Shortcuts
Action |
Vim Shortcuts |
Replace a single character |
r |
Join the line below to the current one |
j |
Change an entire line |
cc |
Change to the end of the word |
cw |
Change to the end of line |
c$ |
Delete the character at the cursor and substitute text |
s |
Delete line at the cursor and substitute text |
S |
Transpose two letters |
xp |
Undo |
u |
Repeat the last command |
. |
Cursor Movement Shortcuts
Action |
Vim Shortcut keys |
Move left |
h |
Move down |
j |
Move up |
k |
Move right |
l |
Jump by the start of words |
w |
Jump by words |
W |
Jump to end of words |
e |
Jump to end of words no punctuation |
E |
Jump backwards by words |
b |
Jump backwards by words no punctuation |
B |
Start of line |
0 |
First non-blank character of the line |
^ |
End of line |
$ |
Go To command |
G |
Start insert mode at the cursor |
i |
Insert at the beginning of the line |
I |
Append after the cursor |
a |
Append at the end of the line |
A |
Open blank line below the current line |
o |
Open blank line above the current line |
O |
Append at end word |
ea |
Exit insert mode |
Esc |
Read More: 70 ZBrush Shortcuts for Windows
Visual Mode Shortcuts
Action |
Vim Shortcut keys |
Start visual mode, mark lines, then do command |
v |
Start Linewise visual mode |
V |
Move to other ends of the marked area |
o |
Start visual block mode |
Ctrl + V |
Move to other corners of the block |
O |
Mark a word |
aw |
A () block |
ab |
A {} block |
aB |
Inner () block |
ib |
Inner {} block |
iB |
Exit visual mode |
Esc |
Cut & Paste Shortcuts
Action |
Vim Shortcut keys |
Yank (copy) a line |
yy |
Yank 2 lines |
2yy |
Yank word |
yw |
Yank to end of line |
y$ |
Paste the clipboard after the cursor |
p |
Paste before cursor |
P |
Cut a line |
dd |
Cut the current word |
dw |
Cut current character |
x |
Read More: 60 Solidworks Shortcuts for Windows
Visual Commands Shortcuts
Action |
Vim Shortcut keys |
Shift right |
> |
Shift left |
< |
yank marked text |
y |
Delete marked text |
d |
Switch case |
~ |
Search & Replace Shortcuts
Action |
Vim Shortcut keys |
Search for pattern |
/pattern |
Search backward for pattern |
?pattern |
Repeat search in the same direction |
n |
Repeat search in the opposite direction |
N |
Replace all old with new throughout the file |
:%s/old/new/g |
Replace all old with new throughout file with confirmations |
:%s/old/new/gc |
Read More: 20 Putty Shortcuts for Windows
Working with Files Shortcuts
Action |
Vim Shortcut keys |
Edit a file in a new buffer |
:e filename |
Go to the next buffer |
:bnext |
Go to the previous buffer |
:bprev |
Delete a buffer |
:bd |
Open a file in a new buffer and split the window |
:sp filename |
Split windows |
Ctrl + ws |
Switch between windows |
Ctrl + ww |
Quit a window |
Ctrl + wq |
Split windows vertically |
Ctrl + wv |
Exit Shortcuts
Action |
Vim Shortcut keys |
Write (save) the file, but don’t exist |
:w |
Write (save) and quit |
:wq |
Quit (fails if anything has changed) |
:q |
Quit and throw away changes |
:q! |
Download Vim Shortcuts Cheat Sheet
Download Vim Shortcuts Cheat Sheet
Vim is a free, open-source and most popular text editor for Linux users. However, it is not everyone’s cup of tea to work with. You need to learn a variety of Vim shortcuts to get your hands on it. Emacs is another text editor that you work with instead of Vim. Have a look at the Emacs Shortcuts list here.
FAQs
What is Ctrl-R in Vim?
Ctrl-R keys allow entering a command in command mode to paste the current paste buffer contents.
What does Ctrl-A do in Vim?
Ctrl-A keys allow incrementing the next number in normal mode.
READ NEXT: