VIM Cheatsheet
Page Up/Down
Ctrl+b
- full page up
Ctrl+f
- full page down
Ctrl+u
- half page up
Ctrl+d
- half page down
Explorer
:Ex
- explore files
%
- new file
d
- new directory
Split
:bd
- buffer delete
:copen
- list files
:cn
- next
:cp
- previous
:sp
- split
:vsp
- v-split
C+w [h,j,k,l]
- navigation
C+w =
- equal splits
C+w _
- max current split
C+w |
- max current v-split
Tab
tabe
- tab edit
gt
- next tab e.g. gt, 3gt
gT
- previous tab
:tabnew
- new tab
:tabm
- move tab to right end
:tabm 0
- move tab to left end
:tabclose
- close tab
:tabonly
- active tab only
:tab ball
- open all buffer
:drop file.txt
- open file.txt in current tab
C+w T
- open the current split in new tab
Mark
m[char]
- mark e.g. ma, mb, mc
'[char]
- go to marked line e.g. 'a, 'b, 'c
`[char]
- go to marked position e.g. `a, `b
:marks
- list marks
:delmarks a,b,c
- delete marks
:delmarks!
- delete all marks
Fold
zf
- fold selected visual lines
zo
- open fold
zc
- close fold
zd
- delete fold
zE
- delete all fold
zA
- open/close all fold in toggle
Explorer
Ex
- horizontal explorer
Vex
- vertical explorer
gh
- hide/unhide hidden files
I
- hide/unhide banner
i
- change view style