Tutorial :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:1

Try removing block from the "foldopen" option.

:set foldopen-=block  

Or maybe the foldclose=all option...

:set foldclose=all  


Solution:2

Try adding a match for the # {{{ like # {{{1 and then a # }}}1


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »