I came across a strange problem, strange at least to me. I'm using vim
6.3 on a linux box.

The thing has to do with folding. If I type

:setlocal foldmethod=expr
:setlocal foldexpr=0

then the foldlevel of every line should be zero. This I do just to
make sure that the starting point is clear. After the above I do a

:syn region myFold start='{' end='}' transparent fold
:syntax sync fromstart
:setlocal foldmethod=syntax

in order to have everything folded between { and } as is useful for C
coding. Now the strangeness is that this most of the time work,
however if I'm jumping back and forth between different files in
different windows (I use vim in a single xterm but have several :split
and :vsplit windows) using tags then sometimes it breaks down and the
whole file gets folded at the first function, that is after the first
{ everything is folded together although there are several other
functions in the file with several { } pairs.

What is not clear to me is that even if this happens then if I type
all the commands above that should fix it, since with the first 2
commands all folding related thing should be erased, shouldn't it? But
it doesn't happen, once folding went crazy I can't get it fixed. So I
guess my questions are if anyone has experienced such a behaviour and
what can be done about it (I only guess that it has to do with jumping
with tags between files, but that's the only thing I could narrow it
down to).

Any pointers or ideas would be very helpful.

Reply via email to