Reading Vim Code - Closing / Minimizing Brackets

I need to read some gigantic Perl scripts, and I would like to know how you guys add the functionality of β€œminimizing” brackets to Vim, as text editors are GUI-based. Because of this, it is difficult for me to understand the code, if I could just minimize those giant ifs, functions, etc. My mind would be very grateful.

+5
source share
1 answer

By minimizing, I suppose, you mean the folding code

:help fold

z Ccloses all folds recursively under the cursor, z Ccloses one fold. z oopens the cursor under the button, and z Rrecursively opens all the folds.

see also

:help :foldmethod

For Perl you will need :set foldmethod=syntax.

+7
source

All Articles