Vim keyboard shortcuts 

Vim    

Zeynel -
7 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.

1
Esc

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

2
I

Insert mode” for inserting text. Keys behave as expected

1
:

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

Advertisement

1
H

Move the cursor one character to the left

-1
J

Move the cursor down one line

0
or Ctrl + J
2
K

Move the cursor up one line

-1
or Ctrl + P
-1
L

Move the cursor one character to the right

1
0

Move the cursor to the beginning of the line

-3
$

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)

-1
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

2
G then G

Move to the beginning of the file

2
(

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

0
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

2
P

Paste storage buffer after current line

1
P

Paste storage buffer before current line

1
U

undo the last operation

0
Ctrl + R

Redo the last undo

1
~

Switch case

0
D

Delete a word

0
C

Change

Advertisement

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

3
: then W then Q

Save the file and quit Vim

0
: then Q then !

Quit Vim without saving the changes to the file

1
Z then Z

Write file, if modified, and quit Vim

0
Z then Q

Same as :q! Quits Vim without writing changes


Share this page on:
Is this page helpful?
2 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

Similar programs



User operations

Add Vim to your list of favorites

Advertisement


What is your favorite Vim hotkey? Do you have any useful tips for it? Let other users know below.


Only registered users can post links.
 
No comments yet. Ask, or type the first one!