The problem with both these methods (setting foldlevel or
foldlevelstart to a high value) is that you can't immediately use "zm"
to start folding away text.
I use zR in an autocmd for this purpose.
Your autocmd will be different (you probably want BufRead or
something), but here is what I do to enable syntax-based folding on
certain file-types, but start with all folds open in a way that I can
immediately use "zm" to start folding:
" Note, perl automatically sets foldmethod in the syntax file
autocmd Syntax c,cpp,vim,xml,html,xhtml setlocal foldmethod=syntax
autocmd Syntax c,cpp,vim,xml,html,xhtml,perl normal zR
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---