On 4/26/06, Benji Fisher <[EMAIL PROTECTED]> wrote: > On Tue, Apr 25, 2006 at 11:00:37PM -0600, Eric Arnold wrote: > > On 4/25/06, Benji Fisher <[EMAIL PROTECTED]> wrote: > > > > > > 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. > > I think of it this way: a zero-width pattern matches in between > two characters. For example, /\</ matches between the space and the "b" > in "foo bar". > > > > syn clear > > > syn match Visual /\%5l./ > > > > Do you mean /\%5l.*/ ? > > I am pretty sure that I tried what I typed. My pattern should > match each character individually in the fifth line; yours should match > the whole line at once. > > > > 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. > > I can do it in one step: > > :syn match Search /\%>3l\%<6l\%>2c\%<5c./ containedin=ALL > > highlights a little 2x2 square as I edit this e-mail. (I used > containedin=ALL since I did not do a :syn clear first.)
Cool. Thanks. Any idea why it works differently than :match .
