On Tue, Sep 12, 2006 at 07:30:55PM -0500, Bill McCarthy wrote: > > Thanks, Tony. I was just getting ready to respond to myself > with another solution I found with a hint from the help > file: > > let b:match_words = > \'\%(\S\+\)\@<!text\s*$:\%(\S\+\)\@<!endtext\s*$' > > Hint from ":help matchit-spaces" > Also ":help /\@<!" > > But I'm still wondering why '\zs' didn't work.
Even I do not know for sure. I think the point is that matchit takes '<pat1>:<pat2>' and builds up the regex /\%(<pat1>\)\|\%(<pat2>\)/ . If you are just searching for /<pat1>/ then it does not matter if <pat1> is \s*\zstext or \(\s*\)\@<=text , but when you build the larger regex, it does make a difference. IIRC, early versions of the script were written before \@<= was added so I included a special marker (& I think, inspired by :menu syntax) for when you wanted to position the cursor somewhere other than at the start of the match. HTH --Benji Fisher