Vim keyboard shortcuts

Vim  

Zeynel Abidin Öztürk -
5 years ago
- Shortcuts

Note: We haven't included every command shortcut here, as some of them weren't looking like keyboard shortcuts but rather commands.

2
Esc

Gets out of the current mode into the “command mode”. All keys are bound of commands

1
I

Insert mode” for inserting text. Keys behave as expected

0
:

“Last-line mode”. In this mode, Vim expects you to enter a command such as to save the document

0
H

Move the cursor one character to the left

0
J

Move the cursor down one line

0
or Ctrl + J
2
K

Move the cursor up one line

-1
or Ctrl + P
0
L

Move the cursor one character to the right

1
0

Move the cursor to the beginning of the line

-2
$

Move the cursor to the end of the line

0
^

Move the cursor to the first non-empty character of the line

0
W

Move forward one word (next alphanumeric word)

0
W

Move forward one word (delimited by a white space)

0
5 then W

Move forward five words

0
B

Move backward one word (previous alphanumeric word)

0
B

Move backward one word (delimited by a white space)

0
5 then B

Move backward five words

-1
G

Move to the end of the file

1
G then G

Move to the beginning of the file

0
(

Jump to the previous sentence

1
)

Jump to the next sentence

0
{

Jump to the previous paragraph

0
}

Jump to the next paragraph

0
[ then [

Jump to the previous section

0
] then ]

Jump to the next section

0
[ then ]

Jump to the end of the previous section

0
] then [

Jump to the end of the next section

0
A

Insert text after the cursor

0
A

Insert text at the end of the line

1
I

Insert text before the cursor

0
O

Begin a new line below the cursor

0
O

Begin a new line above the cursor

0
X

Delete character at cursor

-1
D then W

Delete a word

0
D then 0

Delete to the beginning of a line

0
D then $

Delete to the end of a line

0
D then )

Delete to the end of sentence

0
D then G then G

Delete to the beginning of the file

0
D then G

Delete to the end of the file

2
D then D

Delete line

0
3 then D then D

Delete three lines

1
R

Replace characters instead of inserting them

1
Y then Y

Copy current line into storage buffer

1
P

Paste storage buffer after current line

1
P

Paste storage buffer before current line

0
U

undo the last operation

0
Ctrl + R

Redo the last undo

1
~

Switch case

0
D

Delete a word

0
C

Change

0
Y

Yank

0
>

Shift right

0
<

Shift left

0
!

Filter through an external command

0
: then Q

Quits Vim but fails when file has been changed

0
: then W

Save the file

1
: then W then Q

Save the file and quit Vim

0
: then Q then !

Quit Vim without saving the changes to the file

0
Z then Z

Write file, if modified, and quit Vim

-1
Z then Q

Same as :q! Quits Vim without writing changes


Share this page on:
Is this page helpful?
1 1

Program information

Program name: Vim Vim (General)

Vim is a text editor, than can be used from a command line interface and as a standalone application in a graphical interface. It was originally released for Amiga but it has since been developed to be cross-platform.

Web page: http://www.vim.org

Last update: 2/3/2020 12:41 PM UTC

How easy to press shortcuts: 80%

More information >>

Shortcut count: 61

Platform detected: Windows or Linux (not macOS)

Similar programs



Advertisement

Join our mailing list!

Your email is kept private and we don't spam.