Vim keyboard shortcuts

Vim

Zeynel Abidin Öztürk -
16 months ago
- Shortcuts

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

Esc

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

I

“Insert mode” for inserting text. Keys behave as expected

:

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

H

Move the cursor one character to the left

J

Move the cursor down one line

or Ctrl + J
K

Move the cursor up one line

or Ctrl + P
L

Move the cursor one character to the right

0

Move the cursor to the beginning of the line

$

Move the cursor to the end of the line

^

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

W

Move forward one word (next alphanumeric word)

W

Move forward one word (delimited by a white space)

5 then W

Move forward five words

B

Move backward one word (previous alphanumeric word)

B

Move backward one word (delimited by a white space)

5 then B

Move backward five words

G

Move to the end of the file

G then G

Move to the beginning of the file

(

Jump to the previous sentence

)

Jump to the next sentence

{

Jump to the previous paragraph

}

Jump to the next paragraph

[ then [

Jump to the previous section

] then ]

Jump to the next section

[ then ]

Jump to the end of the previous section

] then [

Jump to the end of the next section

A

Insert text after the cursor

A

Insert text at the end of the line

I

Insert text before the cursor

O

Begin a new line below the cursor

O

Begin a new line above the cursor

X

delete character at cursor

D then W

Delete a word

D then 0

Delete to the beginning of a line

D then $

Delete to the end of a line

D then )

Delete to the end of sentence

D then G then G

Delete to the beginning of the file

D then G

Delete to the end of the file

D then D

Delete line

3 then D then D

Delete three lines

R

Replace characters instead of inserting them

Y then Y

Copy current line into storage buffer

P

Paste storage buffer after current line

P

Paste storage buffer before current line

U

undo the last operation

Ctrl + R

Redo the last undo

~

Switch case

D

Delete a word

C

Change

Y

Yank

>

Shift right

<

Shift left

!

Filter through an external command

: then Q

Quits Vim but fails when file has been changed

: then W

Save the file

: then W then Q

Save the file and quit Vim

: then Q then !

Quit Vim without saving the changes to the file

Z then Z

Write file, if modified, and quit Vim

Z then Q

Same as :q! Quits Vim without writing changes


Share this page on:

Program information

Program name: 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

Shortcut count: 61

Similar programs


  1. Keyboard symbolsKeyboard symbols
    34057    1
  2. Apex Legends (PC)Apex Legends (PC)
    29664   
  3. Fortnite (PC)Fortnite (PC)
    28510    2
  4. PlayerUnknown's BattlegPlayerUnknown's Battleg
    26042    2
  5. Grand Theft Auto VGrand Theft Auto V
    23191   
  6. SketchUpSketchUp
    22416   
More keyboard shortcuts...

Latest articles

Advertisement

  Subscribe to our mailing list!

Useful technology tips and keyboard shortcuts will appear in your inbox.

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

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