Wednesday, May 12, 2010

Re: Matchit not working on XML/HTML files in Ubuntu Jaunty/9.04

On 14/03/10 19:13, Bill Hudacek wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> Hi, all. I've been using VIM since v3 but have not had any problems
> with it for ..... a few /years/ now :-)
>
> I use VIM to edit XML, and some of these files are huge - the
> combination of folding and matchit's '%' mappings really make vim a
> great XML editor/viewer.
>
> In a shell script file, '%' works (e.g., if->then->else), but not in
> HTML/XML files. Pressing '%' does nothing.
>
> Vim on this box is Vi IMproved 7.2 (2008 Aug 9, compiled Mar 19 2009
> 15:27:51). The version of matchit on this box is 1.13.2.
>
> The following symlinks exist:
>
> /home/bgh/.vim/doc/matchit.txt ->
> /usr/share/vim/addons/doc/matchit.txt
>
> /home/bgh/.vim/plugin/matchit.vim ->
> /usr/share/vim/addons/plugin/matchit.vim
>
> In vim, ":map %" shows this:
>
> o % * v:<C-U>call<SNR>15_Match_wrapper('',1,'o')<CR>
> v % * :<C-U>call<SNR>15_Match_wrapper('',1,'v')<CR>m'gv``
> n % * :<C-U>call<SNR>15_Match_wrapper('',1,'n')<CR>
>
> When I'm editing an XML file, and I try this:
>
> let b:match_debug=100
>
> ...then press '%' on an XML element with children& a close tag later
> in the file, the variable 'b:match_pat' suddenly gets a value:
>
> (:),{:},\[:\],\/\*:\*\/,#if\%(def\)\=:#else\>:#elif\>:

No comments: