Vim shortcut keys Linux

basic

Useful Description Keys
Upvote4 0 Undo U
Upvote4 0 Redo ^R
Back to top

file

Useful Description Keys
Upvote4 0 Save current and continue :W
Upvote4 0 Save current file and exit :WQ
Upvote4 0 Exit without saving changes to current file :Q!
Upvote4 0 Quit (no changes made) :Q
Upvote4 0 Save as new file "new-file" :W NEW-FILE
Upvote4 0 Load the file "myfile" into vi :E MYFILE
Back to top

cursor

Useful Description Keys
Upvote4 0 move left LEFT ARROW OR H
Upvote4 0 move left 5 characters 5H
Upvote4 0 move down DOWN ARROW OR J
Upvote4 0 move down 5 characters 5J
Upvote4 0 move up UP ARROW OR K
Upvote4 0 move up 5 characters 5K
Upvote4 0 move right RIGHT ARROW OR L
Upvote4 0 move right 5 characters 5L
Upvote4 0 move to next words based on puctuation W
Upvote4 0 move to next words based on spaces W
Upvote4 0 move to the end of words based on punctuation E
Upvote4 0 move to end of words regardless of punctuation E
Upvote4 0 move backward by words by punctuation B
Upvote4 0 move backward by words regardless of punctuation B
Upvote4 0 go to the start of the line 0 (ZERO)
Upvote4 0 move to the first non-blank character of line ^
Upvote4 0 move to the end of line $
Upvote4 0 move to the specified character number (prefixed) G
Upvote4 0 Toggle inserting or appending text INSERT
Upvote4 0 start insert mode at cursor I
Upvote4 0 insert at the beginning of the line I
Upvote4 0 append after the cursor A
Upvote4 0 append at the end of the line A
Upvote4 0 open (append) blank line below current line (no need to press return) O
Upvote4 0 open blank line above current line O
Upvote4 0 append at end of word EA
Upvote4 0 exit insert mode ESC
Upvote4 0 Jump to the bottom of the file G
Upvote4 0 Jump to e.g. the tenth line of the file 10G
Upvote4 0 Jump to the top of the file GG
Upvote4 0 Jump one page forward ^F
Upvote4 0 Jump half a page forward ^U
Upvote4 0 Jump one page back ^B
Upvote4 0 Jump half a page back ^D
Upvote4 0 Start of next word W
Upvote4 0 End of next word E
Upvote4 0 Start of next sentence )
Upvote4 0 Start of previous sentence (
Upvote4 0 Start of line 0 (ZERO)
Upvote4 0 End of line $
Upvote4 0 Top of screen H
Upvote4 0 Bottom of screen L
Upvote4 0 Middle of screen M
Back to top

edit

Useful Description Keys
Upvote4 0 Delete the character under the cursor X OR DEL
Upvote4 0 Delete the current word (inc. space) DW
Upvote4 0 Delete the next 10 words 10DW
Upvote4 0 Delete the current line DD
Upvote4 0 Delete the next 10 lines 10DD
Upvote4 0 Delete rest of this line, right of the cursor D$
Upvote4 0 Yank the current line onto the clipboard YY
Upvote4 0 Yank the current word onto the clipboard YW
Upvote4 0 Paste the clipboard P
Upvote4 0 replace a character R
Upvote4 0 join the line below to the current one J
Upvote4 0 change an entire line CC
Upvote4 0 replace up to the end of word CW
Upvote4 0 replace to the end of line C$
Upvote4 0 delete the character at cursor and subsitute in text S
Upvote4 0 delete line at cursor and substitute text S
Upvote4 0 transpose two letters XP
Upvote4 0 shift right >
Upvote4 0 shift left <
Upvote4 0 yank (copy) marked text Y
Upvote4 0 delete marked text D
Upvote4 0 switch case ~
Back to top

search

Useful Description Keys
Upvote4 0 Find next occurrence of text N
Upvote4 0 Find previous occurrence of text N
Upvote4 0 search for pattern /PATTERN
Upvote4 0 search backward for pattern ?PATTERN
Upvote4 0 repeat search in same direction N
Upvote4 0 repeat search in opposite direction N
Upvote4 0 replace all old with new throughout file :%S/OLD/NEW/G
Upvote4 0 replace all old with new throughout file with confirmations :%S/OLD/NEW/GC
Back to top

files

Useful Description Keys
Upvote4 0 Edit a file in a new buffer :E FILENAME
Upvote4 0 go to next buffer :BNEXT (OR :BN)
Upvote4 0 go to previous buffer :BPREV (OF :BP)
Upvote4 0 delete a buffer (close a file) :BD
Upvote4 0 Open a file in a new buffer and split window :SP FILENAME
Upvote4 0 Split windows CTRL+WS
Upvote4 0 switch between windows CTRL+WW
Upvote4 0 Quit a window CTRL+WQ
Upvote4 0 Split windows vertically CTRL+WV
Back to top

We aim to provide a service which helps you get more from your software. If you spot that our information is incorrect in any way, please contact us and we will update it accordingly.

This website is not in any way connected to Vim.