I often use zC
to close nested folds under the cursor. However this command is not useful in files with a single, global level-zero fold (e.g. fortran program...end program
and latex \begin{document}...\end{document}
). In these files I typically use setlocal foldlevel=1
and rarely want to fold below that level.
Are there any commands or functions I can use to recursively close folds under the cursor only up to the current fold level? Perhaps this needs a custom function?