|
:q
|
quit
|
|
:w
|
write changes
|
|
:q!
|
quit without write changes
|
|
:wq
|
write changes and quit
|
|
:w file
|
write changes to new file
|
|
:e file
|
edit file
|
|
:tabnew file
|
edit file in a new tab
|
|
:split file
|
edit file in new horizontal split
|
|
h|j|k|l
|
left|down|up|right
|
|
w|b
|
start of next|previous word
|
|
0|$
|
beginning|end of line
|
|
gg|G
|
first|last line of file
|
|
:n
|
go to line number n
|
|
gt|gT
|
go to next|previous tab
|
|
ctrl+w w
|
cycle through splits
|
|
/{string}
|
search matching string
|
|
n|N
|
go to next|previous matching string
|
|
i
|
insert
|
|
x
|
delete character under cursor
|
|
daw
|
delete word under cursor
|
|
dd
|
delete entire line
|
|
d0|$|gg|G
|
delete from cursor
|
|
y
|
copy character under cursor
|
|
yaw
|
copy word under cursor
|
|
yy
|
copy entire line
|
|
y0|$|gg|G
|
copy from cursor
|
|
p
|
paste after cursor
|
|
~
|
toggle case of character under cursor
|
|
:s/{pattern}/{string}/gc
|
replace new with old in all matches(g) and confirm(c)
|
|
:.[cmd]
|
apply command to current line
|
|
:n,m[cmd]
|
apply command between lines n,m
|
|
:%[cmd]
|
apply command to all lines
|
|
:g/{pattern}/[cmd]
|
apply command to all lines that contain pattern
|
|
u
|
undo
|
|
ctrl+r
|
redo
|
No comments yet.
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.