> Hi,
>
> If you press % at the last '}' you will end up with the '{' in the
> comment, I'm wondering if there is any way vim can be instructed to
> treat comment and code separately, so a brace in comment only match
> one in comment and a brace in code only match one in code.
>
> #include <stdlib.h>
> #include <stdio.h>
>
> int real_compar_down(const void *x, const void *y) {
> if (*((REAL*) x) < *((REAL*) y)) {
> return 1;
> }
> /*
> * This is a problmatic comment {
> *
> * */
>
> else if (*((REAL*) x) > *((REAL*) y)) {
> return -1;
> }
> else {
> return 0;
> }
> }
I think the matchit plugin does skips matches in comments. It is already
distributed with Vim, you only need to enable it. See
:h matchit-install
on how to do this.
regards,
Christian
--
You received this message from the "vim_use" 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
No comments:
Post a Comment