On Fri, Aug 26, 2011 at 11:04 PM, Tony Mechelynck <
antoine.mechely...@gmail.com> wrote:

> On 26/08/11 17:23, Donald Allen wrote:
>
>> I am attempting to edit Scheme code with vim. I've always done this with
>> emacs, but in the last year or so, I've become a convert to vi-style
>> editing. But, obviously, parenthesis matching is a key issue when
>> editing Lisp or Scheme
>> and I am pretty frustrated by the vim paren-matcher's finding parens
>> inside strings. I simply want it to ignore anything inside a string and
>> have spent more than enough time picking through the documentation for %
>> and for the matchit plugin and have not been able to find a way to get
>> the simple behavior I want.
>>
>> For example, positioning the cursor on the opening paren of this line:
>>
>> (hash-table-set! the-table "SETUP,create,original" ");")
>>
>> highlights the close-paren inside ");".
>>
>
> That's not from the matchit plugin, it's from the matchparen plugin. If you
> hit the % key repeatedly, the cursor ought to alternate between the ( you
> were on and its _true_ ) match (if you have installed matchit, which is not
> the default).
>

Thanks for clearing this up -- I was confused about what the default plugin
was. I had not installed matchit, so am using the default -- matchparen.

>
> To disable the matchparen highlight completely, you can use
>        :NoMatchParen
> at any time (reverse it by
>        :DoMatchParen
> ), or you can use
>        :let loaded_matchparen = 1
> in your vimrc (but if you do it that way, IIUC you can't enable it back).


When I disable matchparen via the  :NoMatchParen command, with the cursor
positioned as described in my original message, % moves back and forth
between the open and correct close paren, ignoring the paren in the string.
In other words, the behavior is correct. There's no paren highlighting, but
at least % works correctly. With matchparen enabled, the highlighting is
wrong and % behaves incorrectly, too, bouncing between the open paren and
the close paren inside the string.

>
>
>
>> I am running vim 7.3.285 on a Slackware 13.37 64-bit system. I built vim
>> from source. cpoptions=aABceFs.
>>
>> Any help will be appreciated.
>>
>> /Don Allen
>>
>
>
> Best regards,
> Tony.
> --
> It is better for civilization to be going down the drain than to be
> coming up it.
>                -- Henry Allen
>
>

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui