Hi,
Suresh Govindachar wrote:
> A.J.Mechelynck wrote
> >Suresh Govindachar wrote:
> >>
> >> Start gvim via command:
> >> c:\opt\vim\vim70\gvim.exe --noplugin -u NONE -U NONE
> >>
> >> :saveas boo.c
> >> :set filetype=c
> >>
> >> Enter following text:
> >>
> >> if(1)
> >> {
> >> /* ------- {{{3 */
> >> }
> >>
> >> :w
> >> Now try to jump between { using %.
> >>
> >> Bug: The { in the manual fold-markers interferes with %-jumping.
> >
> > [comments on using the matchit plugin]
>
> % is a feature of Vim -- I am not trying to use % in any fancy
> way, only in the way it is supposed to work under regular Vim.
> I am reporting a bug in vim (and not looking for a work-around
> based on a plugin). The bug is that % is not ignoring { within
> c-comments in a c-file.
what did lead you to the conclusion that the behaviour of % -- to not
ignore matching parentheses inside comments -- is a bug? I don't see a
place in the help files where % is documented to skip comments. You can
only force it to skip strings by removing % from cpoptions (see ":help
cpo-%"). The text
Does not recognize "/*" and "*/".
from this help section does not relate to /* and */ as C style comments,
but as potentially matching pairs which are not counted as such if % is
included in cpoptions.
IMHO ignoring comments while searching for a matching parenthesis might
be considered a missing feature, but this can easily -- as Tony wrote --
be implemented by sourcing the matchit plugin.
Regards,
Jürgen
--
Sometimes I think the surest sign that intelligent life exists elsewhere
in the universe is that none of it has tried to contact us. (Calvin)