On 23/10/08 02:02, Gary Johnson wrote:
> On 2008-10-22, Robin Wood<[EMAIL PROTECTED]> wrote:
>> 2008/10/22 Gary Johnson<[EMAIL PROTECTED]>:
>>> I compile my own vim, but it turns out that one of the machines I
>>> use is also running RHEL 4 and that /usr/bin/vim is version 6.3.82.
>>> I tried the following:
>>>
>>> $ /usr/bin/vim -N -u NONE somefile.html
>>> :so /usr/share/vim/vim63/macros/matchit.vim
>>> :filetype plugin on
>>> :filetype detect
>>>
>>> I put the cursor on the opening< of the<head> tag and hit %. Each
>>> press of % moved the cursor back and forth between the< and the>
>>> of the<head> tag. Then I moved the cursor to the 'h' in<head>.
>>> Hitting % moved the cursor to the / in the</head> tag. Each
>>> subsequent press of % moved the cursor back and forth between the
>>> first characters of the<head> and</head> tags.
>>>
>> Can you try braces as well as angle brackets, it is those I usually
>> try to match.
>
> I started vim as above, added matched pairs of the following to my
> test file:
>
> () [] {}
>
> and first verified that % on each pair worked. (It didn't work with
> the<> pairs, but that's expected given the default value of
> 'matchpairs'.) Then I repeated the remaining steps above and tried
> again. % still worked with each of those pairs as well as with<>
> and tags.
>
> Regards,
> Gary
Angle brackets and <tag>...</tag> (but not <tag />) are set by the
ftplugin scripts for XML and HTML when matchit is installed. If you want
to use angle brackets in some language (in C I wouldn't, since in that
language they are not brackets but comparison operators), you can add
them by using
:setlocal matchpairs+=<:>
in an appropriate ftplugin script or FileType autocommand. Just make
sure that "my" autocommand (setting b:match_words to &matchpairs) is
executed after setting the correct 'matchpairs' value.
Best regards,
Tony.
--
Sometimes I worry about being a success in a mediocre world.
-- Lily Tomlin
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---