Search code examples
vimfolding

Preventing vim to auto-expand folds


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