On 27-Oct-2013 21:11 +0100, Christian Brabandt wrote:

> On So, 27 Okt 2013, Alexander Shukaev wrote:
> 
>> I've stumbled across the issue with syntax highlighting. Rather than
>> rewriting, I'll post a link to the question on Stack Overflow: Vim: Syntax
>> Highlighting Doesn't Work with Recursive `nextgroup` Across Newlines When
>> Contained<http://stackoverflow.com/questions/19614494/vim-syntax-highlighting-doesnt-work-with-recursive-nextgroup-across-newlines>
>> as there is code formatting. If it is absolutely necessary, I can repost it
>> here, just tell me. Please, take a look at this.
> 
> Please include a short description of the error in the mail, so one
> doesn't need to look up an error by starting a web browser.
> 
> If I see this correctly, you are wondering why this:
> 
> #v+
> syntax match MyComment '#.*$' contains=A
> 
> syntax match A 'a' nextgroup=B skipwhite skipnl
> syntax match B '#\=\s*\zsb' contained nextgroup=B skipwhite skipnl
> 
> highlight default link A Type
> highlight default link B Error
> highlight default link MyComment Comment
> #v-
> 
> Doesn't match the second line in:
> 
> # a b b b
> # b b

> If I understand it correctly, I see no reason, why your comments should
> highlight the 'b' as you do not have the group 'B' contained inside the
> MyComment syntax match. (e.g. you are missing a leading 'a' in the
> second line).

In the first line, group 'A' prefers a following 'B' via the
"nextgroup=B", and this does work for the next 3 'b' in the same line.
It apparently fails in the second line, even though "skipnl" has been given.

-- regards, ingo

-- 
-- 
You received this message from the "vim_dev" 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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Raspunde prin e-mail lui