paperlined.org
apps
>
vim
document updated 15 years ago, on Jan 23, 2009
This is not a
complete
Vim manual. Rather, it contains only the commands that I most frequently use.
Expand/close all
Movement
Screen-oriented movement
H
jump to top of screen
M
jump to middle of screen
L
jump to bottom of screen
zt
make current line be at top of screen
zz
make current line be in middle of screen
zb
make current line be at bottom of screen
Scrolling
Ctrl-E
up one line
Ctrl-Y
down one line
Marks
:marks
list all available marks
Windows
Ctrl-W <dir>
move to another window
Ctrl-W q
close the current window
Folds
Fold modification
zf
create a fold
zd
delete the fold at the cursor
zE
delete (Eliminate) all folds
Fold opening/closing
zo
open one fold under the cursor
zO
open all folds under the cursor
zc
close one fold under the cursor
zC
close all folds under the cursor
zm
increase the foldlevel by one
zM
close all folds
zr
decrease the foldlevel by one
zR
open all folds
zn
temporarily make all folds be open (i.e. disable folding)
zN
re-enable folding (all folds will be as they were before)
zi
toggle disable/enable folds
Fold movement
zj
move to the start of the next fold
zk
move to the end of the previous fold
[z
move to start of open fold
]z
move to end of open fold
Changing text
Ctrl-A
increment number
Ctrl-X
decrement number
gq
format text according to 'textwidth' and 'formatoptions'