Skip to content

Instantly share code, notes, and snippets.

@calorie
Created June 14, 2012 17:16
Show Gist options
  • Save calorie/2931588 to your computer and use it in GitHub Desktop.
Save calorie/2931588 to your computer and use it in GitHub Desktop.
vim control
# basic
:q exit
:w save
:x save & exit
# move
h left
j down
k up
l right
e next word end
b prev word start
0 start of line
$ end of line
gg start of file
10gg to line 10
G end of file
^ start of line
# scroll
ctrl+d down
ctrl+u up
#delete
x delete 1 char
[n]x delete n char
dw delete back 1 char
d$ delete line to end
d0 delete line to start
[n]dl delete back n char
dd delete 1 line
# insert
i insert mode
I insert mode from line start
a insert mode back 1 char
A insert mode from line end
o insert mode down 1 line
O insert mode up 1 lne
# search
/word search "word"
n next candidate
N prev candidate
:noh delete highlight
# copy
v visual mode
y copy
p paste
# other
~ capital change small & small change capital
u undo
U undo undo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment