is there a trick to fold all other functions but not the function in there my cursor is?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You could define a normal-mode map like this:
The
zMcloses all folds in the current file (which will fold the current function), then thezOrecursively opens the fold under the cursor (which will unfold the current function).This assumes you’ve
:set foldmethod=syntax; it won’t necessarily work as well with other types of folding.