Tuesday, July 27, 2010

Syntax + Nextgroup + newline question

" If you source this file with :so %
" Why is the first 'b' on a line not highlighted?
syntax clear
syntax match A /^a/ nextgroup=B
syntax match B /\_s\+b/ contained
hi link A Error
hi link B Todo
finish

=====
a
b
a
b
a b
=====

Happens with various Vim versions in the 7.2+ range. Tried with various
skip{white,nl,empty} options added to the 'nextgroup' line. Seems like
something that's probably explained somewhere, but I don't see it.

--
Thanks,
Ben

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