> OK, from this, when editing a php file I get
> :echo b:match_words
> (:),{:},[:]
>
> and :verbose set matchpairs? gives
> matchpairs=(:),{:},[:]
>
> However, on my desktop with the latest vim when I do the echo I get this
>
> <?php:?>,\<switch\>:\<endswitch\>,\<if\>:\<elseif\>:\<else\>:\<endif\>,\<while\>:\<endwhile\>,\<do\>:\<while\>,\<for\>:\<endfor\>,\<foreach\>:\<endforeach\>,(:),[:],{:},<:>,<\@<=[ou]l\>[^>]*\%(>\|$\):<\@<=li\>:<\@<=/
> [ou]l>,<\@<=dl\>[^>]*\%(>\|$\):<\@<=d[td]\>:<\@<=/dl>,<\@<=\([^/][^
> \t>]*\)[^>]*\%(>\|$\):<\@<=/\1>
>
> This obviously explains the difference in how things work. Could it be
> just the version of vim that is causing the problem or something else.
Most likely it's the filetype plugins.
Upgrading the filetype plugins without upgrading Vim itself probably
isn't a good idea, and I don't know where you could get version
controlled runtimes to pick up the latest version 6 ones either, though
they would be likely to work, and might have improvements such as better
matchit support for some filetypes.
Is it only a few filetypes you are interested in? I would suggest
finding the relevant parts of the newer filetype plugins and copying
just those parts into ~/.vim/after/ftplugin/whatever.vim. It probably
often wouldn't need to be in the after-directory, but sometimes it might
need to be so might as well make it a habit of putting it there. You can
download the latest runtime files by FTP or something; see the 'Runtime
files' section of vim.org for details--don't just use the tarballs, as
they are not the most current; use the FTP or rsync or aap or something.
E.g. you could try putting this code snippet in
~/.vim/after/ftplugin/php.vim which would probably fix it for PHP.
let s:match_words = ""
if exists("b:match_words")
let s:match_words = b:match_words
endif
if exists("loaded_matchit")
let b:match_words = '<?php:?>,\<switch\>:\<endswitch\>,' .
\ '\<if\>:\<elseif\>:\<else\>:\<endif\>,' .
\ '\<while\>:\<endwhile\>,' .
\ '\<do\>:\<while\>,' .
\ '\<for\>:\<endfor\>,' .
\ '\<foreach\>:\<endforeach\>,' .
\ '(:),[:],{:},' .
\ s:match_words
endif
I don't think the fundamental functionality of matchit has changed much;
it's just had bugfixes I think; so copying matchit-relevant
(b:match_words) stuff from newer runtimes shouldn't hurt.
Ben.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---