Hi, I'm Harry.

Vim folding

November 2022

I use vim folding a lot, but I always forget commands and run the same search, only to find the same blog posts covering what I need - but only after I've visited the same 3 other posts that don't tell me what I need.

So, here are the commands so I don't need to always go hunting for them:

za – Toggles the fold.
zA – Same as above, but toggles folds recursively.
zo – Open the current fold.
zO – Same as above, but opens folds recursively.
zc – Close the current fold.
zC – Same as above, but closes folds recursively.