On 4/25/06, Benji Fisher <[EMAIL PROTECTED]> wrote: > 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
I'm fuzzy on what zero-width means. I thought that it meant that it allows subseqent regexp sequences to match at the positition of the zero-width item, not that it couldn't an arbitrary width string. > syn clear > syn match Visual /\%5l./ Do you mean /\%5l.*/ ? > and that seems to work. You should be able to tweak this to get a > rectangle. I've gotten the rectangle I need but it took three steps. That's fine, but I still don't know syn match and match are different. I suppose it could be related to the zero width thing. At this point, I will simply stop using match as a way to prototype regexps for syn match.
