Monday, February 27, 2012

Is is vim's bug of syntax and fold?

Hello, everyone
Recently, I'm writing some plugin on latex. I bumped into one
problem. After debug for sometime, I found a wired thing. Here is
the way to reprocedure it.

1. file.txt:
\begin{homework}
Which came first, the chicken or the egg?
\end{homeworkProblem}

\begin{homework}
Which came first, the chicken egg or the chicken?
\end{homeworkProblem}

2. set fdm=syntax
3. syn region vimBug1 start="{" end="}"
4. syn region vimBig2 start="\\begin{homework}" end="\\end{homework}"
transparent fold

You will find that vim failed to detect the end of homework. However,
if you remove step 3, everything is ok.

I want to know whether this is a vim's bug? If not, how to make it
work just like there is no step 3.
If is, then how to workaround it?

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment