A.J.Mechelynck wrote:
Peter Hodge wrote:
Sorry,
In my example I meant to use
if("string(string")
and not
if('string(string')
because double-quotes DO work, single-quotes do not.
- Peter
I don't know if it's a bug or a feature, but parens/brackets/braces
which are _alone_ inside single quotes are skipped, but not if they are
part of a longer string.
Example:
( ')' 'string)xx(string' '(' )
1 2 3 4 5 6
With the cursor on a parenthese, % jumps between 6 and 4 or between 1
and 3, ignoring 2 and 5. But |matchparen| shows 1 and 2, also 5 and 6,
as being conjugate. (IIUC, you would expect both %-jumping and
matchparen pairing between 1 and 6, and I agree.)
I tested this in an unnamed buffer (displayed as [No Name], and with
'filetype' empty) so the matchit plugin didn't intervene.
?:-|
Best regards,
Tony.
Addendum: It depends on the 'filetype' and possibly on whether %-jumping
is done by Vim C code or by the matchit script: with the same file, if
:set filetype=vim
% jumps between 1 and 6 (but here the matchit plugin comes into play),
and matchparen pairs 1 with 6 too.
Best regards,
Tony.