Vim
-
netrw:Explore: opensnetrwin the current window:Sexplore: opensnetrwin the horizontal split:Vexplore: opensnetrwin a vertical split
-
replace:
- replace first occurence:
:%s/foo/bar/ - replace all:
:%s/foo/bar/g - replace between two lines:
:6,10s/foo/bar/g - replace between from one line to the end of file:
:6,$s/foo/bar/g -
add character at end of line:
:%s/$/\*/g -
disable swap files:
set noswapfile - select pasted text:
gv - full page down: Ctrl + f
- half page down: Ctrl + d
- full page up: Ctrl + b
- half page up: Ctrl + u
record commands
- start recording:
q<key> - end recording:
q - play record:
@<key>