On Oct 3, 10:05 am, Steven Woody <[email protected]> wrote:
>
> >    :h 'foldlevelstart'
> > it is a global option, not to be set when detecting a filetype.
>
> > see also
> >    :h ft-c-syntax
>
> > --
> > Andy
>
> Sorry, I may not get the point. I check the help, but what should I
> do?  currently my folder settings are in ~/vimfiles/filetype.vim,
>
> au BufNewFile,BufRead *.c           call s:cfold()
> au BufNewFile,BufRead *.cpp         call s:cfold()
> au BufNewFile,BufRead *.h           call s:cfold()
>
> func! s:cfold()
>     set fdls=0
>     set fdm=syntax
> endfun

What Andy was trying to point out is, 'foldlevelstart' is a global
option, meant to be set only once in your .vimrc.

It looks like you want to set 'foldlevel' rather than 'foldlevelstart'
on a file-by-file basis.

But, 'foldlevelstart' should do that anyway, I'm not sure why you even
need this.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to