vim: enable folds but don't automatically close them

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

:set foldlevelstart=99

See

:help foldlevelstart

for more.


you can do:

set nofoldenable

for example in my .vimrc I have:

set foldmethod=indent       " automatically fold by indent level
set nofoldenable            " ... but have folds open by default