>
> set foldmethod=indent
> set nofoldenable "dont fold by default
> set foldlevel=0
>
nofoldenable is not the right way to avoid folding by default. With
nofoldenable, all folds are open, as if they did not exist at all. You
cannot interact with them. But, as soon as you try interacting with
them (by pressing zc for example) you automatically set foldenable,
which will apply all the folds that exist in the window. Since your
foldlevel is zero, this means ALL folds will be closed (because they
were already closed, they just weren't being used because of
nofoldenable).
To get what you want, you probably need to use foldlevelstart or some
other methods, as discussed here:
http://vim.wikia.com/wiki/All_folds_open_when_open_a_file
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
No comments:
Post a Comment