Vim keyboard shortcuts 

Vim    

Zeynel -
7 years ago
- Shortcuts

Advertisement

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

1
Y then Y

Copy current line into storage buffer

-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

0
5 then B

Move backward five words

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
5 then W

Move forward five words

-1
Ctrl + P

Move the cursor up one line

2
G then G

Move to the beginning of the file

-3
$

Move the cursor to the end of the line

0
Ctrl + J

Move the cursor down one line

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

1
I

Insert text before the cursor

1
)

Jump to the next sentence

0
^

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

0
>

Shift right

0
<

Shift left

1
~

Switch case

0
D

Delete a word

0
C

Change

0
Y

Yank

0
!

Filter through an external command

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
R

Replace characters instead of inserting them

0
W

Move forward one word (next alphanumeric word)

0
W

Move forward one word (delimited by a white space)

-1
L

Move the cursor one character to the right

1
0

Move the cursor to the beginning of the line

0
B

Move backward one word (previous alphanumeric word)

-1
B

Move backward one word (delimited by a white space)

1
Esc

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

2
K

Move the cursor up one line

Advertisement

1
H

Move the cursor one character to the left

-1
J

Move the cursor down one line

0
{

Jump to the previous paragraph

0
}

Jump to the next paragraph

0
A

Insert text after the cursor

0
A

Insert text at the end of the line

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
G

Move to the end of the file

2
(

Jump to the previous sentence


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

Program information

Program name: Vim Vim (General)

Web page: vim.org

Last update: 03.02.2020 12:41 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!

Latest articles