Although vim has many commands for folding things, I really only use 2, za and zA. They toggle folding at the cursor, capital is recursive.
My point is that folding can appear simple, but depending on features you want to allow it can be more complex.
In reply to Re^3: Code Folding
by afresh1
in thread Code Folding
by sir_lichtkind
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |