On Fri 24-Aug-07 12:03pm -0600, Tony Mechelynck wrote:
> Edward L. Fox wrote:
>> Reporter id: chenkw
>> Community: newsmth
>>
>> Hi developers,
>>
>>
>> Steps to reproduce:
>>
>> Vim 7.0 has a problem jumping between matching brackets in the following
>> case:
>> Foo()
>> {
>> // {
>> }
>>
>> The % command jumps between the close bracket and the open one in the comment
>> rather than at the right beginning of function body.
>>
>>
>> Expect behavior:
>>
>> The % command should jump between semantically matching brackets, such as the
>> pair around the function body in the above case.
>>
>> Notice the correct matching is hilighted when cursor is on a bracket.
>
> Install the matchit plugin (see ":help matchit-install"). One of the
> improvements matchit adds to % matching is that it knows about comments: when
> you hit % outside a comment it will not jump inside one, and when you hit %
> inside a comment it will not jump outside one.
>
> I just tried your example in 7.1.87 with matchit (and filetype set to cpp) and
> % jumped from the first to the third brace and
> vice-versa, completely ignoring
> the comment.
Interesting - it does not work here with the latest
matchit.vim (from macros) copied to my \vim\vimfiles\plugin\
and :se ft=cpp
The first '{' is highlighted when I'm on '}' but '%' jumps
to the '{' in the C++ comment.
--
Best regards,
Bill
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---