On 22/10/08 18:00, Robin Wood wrote:
> 2008/10/22 Tony Mechelynck<[EMAIL PROTECTED]>:
>> On 22/10/08 17:26, Robin Wood wrote:
>>> Hi
>>> I have matchit 1.13.2 installed on a machine and while I can now do
>>> html matches I can no longer do normal bracket matches. It will
>>> occasionally jump from an opening bracket to a close but not the other
>>> way round.
>>>
>>> I've tried re-running :helptags ~/.vim/doc again and also tried
>>> copying a tags file from a working machine, that didn't help.
>>>
>>> If I remove all the matchit stuff bracket matching works fine.
>>>
>>> I'm using version 6.3.82 on RHEL 4.
>>>
>>> Any suggestions on how to fix it?
>>>
>>> Robin
>>
>> I have the following in my vimrc:
>>
>>
>> if has('autocmd')
>>         augroup vimrclocal
>>         " match (:),[:],{:} in matchit for C, C++, CSS and javascript
>>                 au FileType c,cpp,css,javascript
>>                         \ let b:match_words =  &matchpairs
>>         " you may have other autocommands, unrelated to the above.
>>         " Place them here.
>>         augroup END
>> endif
>
> Why should I need this? On all other boxes the matchit script just
> works. I'll give this a try but I'd rather fix what matchit is
> breaking.
>
>>
>> Oh, and BTW version 6.3.82 is hopelessly out-of-date. The current
>
> I'm on a fully managed server and the managers won't update package
> apart from for bug/security fixes so I'm stuck on this old version.
>
> Robin

Matchit is not "breaking" anything, it "improves" % matching; however, 
to do that, it relies on a buffer-local variable b:match_words telling 
it what to match: just look up what that variable is set to in:
- a Vim script,
- an HTML file,
- an XML file
- a bash script
- etc.

The above autocommand "restores" matching of round, square and curly 
brackets for these 4 filetypes which don't set the matchit setting in 
their filetype-plugins. However even here there is a plus: with the 
above, and matchit loaded at startup, you won't anymore pair a bracket 
within a comment with its opposite outside a comment.


Actually (I just checked) the autocommand is superfluous for C and CPP 
(the current ftplugin already does it) but not for CSS and javascript.


About bug/security fixes, take a paper copy of the following files for 
your "managers":

http://ftp.vim.org/pub/vim/patches/6.3/README
http://ftp.vim.org/pub/vim/patches/6.4/README
http://ftp.vim.org/pub/vim/patches/7.0/README
http://ftp.vim.org/pub/vim/patches/7.1/README
http://ftp.vim.org/pub/vim/patches/7.2/README

show them these lists (after reading, of course); or else, if you think 
they won't react, or won't react favourably, skip one level and show it 
to your sysadmins' boss. This doesn't even include bugfixes which 
happened "at" a specific release rather than "between" two releases, but 
there are enough bugfixes and security fixes listed there that any 
sysadmin who refuses to implement them is obviously guilty of sloppy 
management, not to call it by a worse name.

Just FYI (and your sysadmins' boss's), the version _after_ yours 
(6.3.83) is dated 21-Jul-2005 (see the patch at 
http://ftp.vim.org/pub/vim/patches/6.3/6.3.083 -- there are dates in the 
patch headers, near the top but not at the very top), meaning there are 
3 years and 3 months' worth of "bug and security fixes" which your 
so-called "managers" have simply passed over without installing any of them.

As a last resort, you can compile Vim for yourself, following one of the 
HowTo pages I gave earlier -- it's not hard -- and install it at a 
custom location below your home directory, so that when you are logged 
in it's earlier in the PATH than the 6.3 version installed by those 
"managers". (To set the appropriate directory settings at compile-time 
you'll have to read the Makefile.)


Best regards,
Tony.
-- 
Rule of the Great:
        When people you greatly admire appear to be thinking deep
thoughts, they probably are thinking about lunch.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to