> 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. About your 2nd point, I'm equally not sure but
exactly for this reason I don't have { or } in comments and neither in
strings. So that should be okay. 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?

Reply via email to