On Aug 3, 5:12 pm, Andrew Long <[email protected]> wrote:
> The option 'foldlevel' sets the initial number of folds to be open when
> the file is opened. I set this in my .vimrc as a global for all file
> types, but you an set it on a file-by-file basis in the file type
> initialisation routines.
>
> see :he 'foldlevel' (note the apostrophes denote help for an option)
>

Actually, the option 'foldlevel' sets the number of open folds in the
current window, and the global value is used to initialize the value
for new windows. But, if you load a NEW file in the SAME window, the
old foldlevel (even if it has been modified) is used.

The better option to use is 'foldlevelstart' but even that has a few
minor disadvantages, since you can't use zm/zr right away on buffers
with folding much less than the 'foldlevelstart' value.

See http://vim.wikia.com/wiki/All_folds_open_when_open_a_file for a
discussion and alternatives.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to