Skip to content
cheatsheet
home
/
cv
/
weblog
/
cheatsheet
/
proxy
/
vpn
/
status
/
links
EN
RU
☾
New version available
reload
×
cheatsheet
/
vim
/
Open file at line number
Open file at line number
vim
Start vim with cursor on line 42
vim +42 file.txt
⎘ copy
#vim
#linux
more vim
all 10 commands →
Search forward / backward
/pattern (n/N next/prev) ?pattern (backward)
Delete lines matching pattern
:g/^#/d
Re-indent whole file
gg=G
Record and play macro
qa (record into a) q (stop) @a (play) 10@a (play 10 times)
Show line numbers
:set number