Preventing vim to auto-expand folds
Question
I'm using foldmethod=marker and #{{{ #}}} markers in Python code.
After typing #{{{ vim automatically expands all folds below the cursor.
Is it possible to turn this off?
Solution
Try removing block from the "foldopen" option.
:set foldopen-=block
Or maybe the foldclose=all option...
:set foldclose=all
OTHER TIPS
Try adding a match for the # {{{
like # {{{1
and then a # }}}1
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow