On 4/17/06, Daniel Nogradi <[EMAIL PROTECTED]> wrote:
> > Your  ':syntax' commands are not reset when you just retype them.
> > To reset your syntax commands, you need to add something
> > like this at the beginning of your sequence of commands:
> >    :syn clear | syn on
> > or
> >    :syn off | syn on
> >
> > The 2nd point: I'm not sure if your 'syn region' accounts properly
> > for '{' inside comments/strings. Is it possible that '{' inside
> > comments or strings confuses it ? I'm not sure.
>
> Thanks a lot, adding ':syn off | syn on' helped and the messed up
> folding got fixed. ...  I'm still wondering why folding
> breaks down at the first place. Since I suspect it has to do with the
> interaction of different windows I always use setlocal as opposed to
> set to make sure I'm only effecting the current window, this is
> correct isn't it?

Well no, not really. Vim silently allows the :setlocal for for global-only
options. But although you use :setlocal form, the global
option will be set if the option is global-only option. To take an
example: 'bk' is global-only option. But if yuo try ':setlocal bk'
you get no error. I don't like this behavior, it's error-prone. As
a result, you might be changing global option thinking that you
change local option. The only way is to look into help for every
option to check whether it is local or global.

Yakov

Reply via email to