Vim Folding Cheatsheet Link to heading
za
toggle one fold under cursorzA
toggle all fold under cursor recursivelyzc
close one fold under cursorzC
close all fold under cursor recursivelyzf#j
creates a fold from the cursor down # lines.zf/string
creates a fold from the cursor to string .zj
moves the cursor to the next fold.zk
moves the cursor to the previous fold.zo
opens a fold at the cursor.zo
opens a fold at the cursor.zO
opens all folds at the cursor.zM
closes all open folds.zd
deletes the fold at the cursor.zE
deletes all folds.[z
move to start of open fold.]z
move to end of open fold.