On Sun, Apr 23, 2006 at 06:54:27AM -0600, Eric Arnold wrote:
> I don't think I have a prioritization/conflict problem, since I'm
> testing in a buffer without any other syntax (using only one "match"
> or "syn match" at a time), and against lines containing only [a-z]
> (though it was informative to read the archived post, thanks).
> 
> As far as I can tell, there is just some difference in the way "match"
> and "syn match" apply the  \%l  atom.  For example, even simply
> 
> syn match Visual /\%5l/
> 
> doesn't highlight anything.  It seems that "match" is maybe doing some
> extra magic causing  \%5l  to match line 5, where as "syn match" is
> considering   \%5l  as a starting position only.
> 
> I was prototyping my highlighting idea with "match", and was
> confounded by the fact that everything I made work with "match" didn't
> apply to "syn match" :-)

     I think the problem is that \%5l is a zero-width pattern.  I do not
know whether the docs say this, or if it is supposed to work this way,
but perhaps the point is that syntax highlighting applies to
characters, and there is no character that matches a zero-width pattern.
I tried

syn clear
syn match Visual /\%5l./

and that seems to work.  You should be able to tweak this to get a
rectangle.

HTH                                     --Benji Fisher

Reply via email to