Monday, February 27, 2012

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

On Feb 27, 4:45 am, Yichao Zhou <broken.z...@gmail.com> wrote:
> 3. syn region vimBug1 start="{" end="}"
> 4. syn region vimBig2 start="\\begin{homework}" end="\\end{homework}"
> transparent fold
>

This fails because the end of your vimBug1 group matches the last
character of end{homework}, preventing the end of the vimBig2 group
from matching at that location. By default, only one pattern can match
at a specific spot, which allows nesting.

To fix this, you'll need to use the "keepend" keyword. :help :syn-
keepend.

Note that this will make you unable to nest vimBig2 groups, so you
will probably also need to look at :help :syn-extend and make
modifications elsewhere in the syntax file.

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