Vim: enable folds but don’t automatically close them

vim

I really like the folding in Vim, but there are a couple non-file buffers (command-t plugin's window for one) that I really don't want it folding, as the normal fold commands don't work there.

If I could just tell vim to not automatically close folds (only close them when I tell it to) that should fix the problem, but I'm not seeing any options in the vim help for changing that behavior. Is there a way to have folding enabled but not automatically close all folds when a buffer is created/file opened?

Best Answer

The command to have no folds closed when a buffer is opened is

:set foldlevelstart=99

See

:help foldlevelstart

for more.

Related Question