Monday, February 27, 2012

Re: Is is vim's bug of syntax and fold?

Sorry. I made some mistake when I try to reduce the example. Wired
thing is still there

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

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


On Feb 27, 6:57 pm, "Francis (Grizzly) Smit" <griz...@smit.id.au>
wrote:
> On 27/02/12 21:45, Yichao Zhou wrote:> 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}
>
> ummm that end doesn't match the begin??
>
> > 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?
>
> --
>
>    .~.     In my life God comes first....
>    /V\         but Linux is pretty high after that :-D
>   /( )\    Francis (Grizzly) Smit
>   ^^-^^    http://www.smit.id.au/

--
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