Show Menu
Cheatography

Beginner's Vim Keyboard Shortcuts by

Basic shortcuts for vim

Modes

i
insert
esc
normal
v
visual

Movement

j
left
j
down
k
up
l
right

Word Movement

b
start of word
e
end of word
w
next word

Movement

Add numbers to movements to repeat them
3w, 2l

Lines

0
beginning of line
$
end of line

Files

gg
beginning of file
G
end of file
3G
third line of file
 

Inserting text

3igo Esc
inserts "­go" three times

Inserting lines

o
insert new line at location
O
insert new line above current line

Deleting

x
delete character under cursor
X
delete character left of cursor
d
delete word

Deleting

Combine d with movement keys
dw, d2e

Replacing

r
replace single character under cursor
 

Find

f
next occurrence of a character
F
previous occurrence of a character
%
go to matching parent­hesis
*
next occurrence of word under cursor
#
previous occurrence of word under cursor

Find

Add numbers to find other occurr­ences
3fq to find third occurence of q

Search

/
specify search term
n
next occurrence of term
N
previous occurrence of term

Commands

.
repeat previous command
u
undo
ctrl+R
redo

File Commands

:w
save
:q
quit
:q!
quit without save
:help
help

Help Us Go Positive!

We offset our carbon usage with Ecologi. Click the link below to help us!

We offset our carbon footprint via Ecologi
 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          VI Editor Cheat Sheet
          Vim NERDTree Cheat Sheet
          cVim Keyboard Shortcuts