Re: new version of matchit.vim (for vim 6.0)
> 3. Allow b:match_words = "GetMyPattern()" for context-sensitive matchingIf
> patterns. (E.g., for imbedded languages, depending on current syntax.)
> b:match_words does not contain any ":" characters (and is non-empty) thenit
> is treated as an expression to be evaluated.Great, now here is an updated ftplugin/vim.vim to include matchit definition
ruby (its not complete but it still helps a lot) the other scripting
left as an exercise for the reader or for me when I use them.
there is no matchit pattern for perl and tcl and that is surprising, on the
I doubt it can be done for python since it doesn't use patterns to recognize
the end of
a block but indent.
I tried to add something in the ruby pattern for here documents but since
are not really supported but rather emulated it cannot be done I fear
- Gary Johnson wrote:
>In fact, I was working on it tonight. If you want to help test the
> I believe this is a bug in matchit.vim. I observed similar behavior in
> the matching of <>'s surrounding HTML tags. If you don't load
> matchit.vim, vim deletes the matching } as expected. Benji is aware of
> the bug and is supposed to be coming out with a new version of
> matchit.vim real soon now.
latest version (1.2) of matchit.vim for vim 6.0, you can get it from
(Warning: this URL is going to go away in a few weeks.)
I have not yet updated the docs. (The old ones are in
What it does: allow flexible configuration of "%" matching. Many
languages are already supported.
I made the following changes:
1. Fix it so that matching works between "<" and ">" if "<:>" is included in
'matchpairs' or b:match_words, even if "<tag>" is recognized as a matching
pattern. (Background: this used to work, but was broken by a change in vim's
handling of regular expressions.)
2. Improve the behavior in Operator-pending mode. (By default, doing
something complicated in O-mode is exclusive. We want the "%" motion to be
3. Allow b:match_words = "GetMyPattern()" for context-sensitive matching
patterns. (E.g., for imbedded languages, depending on current syntax.) If
b:match_words does not contain any ":" characters (and is non-empty) then it
is treated as an expression to be evaluated.
4. Improve the handling of the (optional) b:match_ignorecase variable.
The fixes for 1 and 3 were pretty easy, but the fix for 2 and 4 (which
actually go together) was complicated, so further testing will be a good