Ok. Understood.

I need to create a match for the inner functions. But can be any function.
How do I do that?


>
> On Jan 12, 10:24 pm, Alessandro Antonello <[email protected]>
> wrote:
> > Hi, All.
> >
> > I'm having a little trouble with syntax highlight. I need to highlight a
> > function call including its parentheses but not what is between. So I did
> > the
> > following:
> >
> > syn region myFuncCall matchgroup=myFuncName transparent start="fun1("
> > end=")" contains=ALL
> > syn match  myFuncName "\<fun1\>" contained
> >
> > So everything looks fine. But when there is another function call inside
> the
> > parentheses the end pattern of the above highlight matches the inner
> > function.
> > For example, In the following code the end pattern matches in the wrong
> > place.
> >
> > fun1(arg0, arg1(), arg2)
> >                 ^
> >                 |
> >                 +--- The end pattern matches here.
> >
>
> arg1() doesn't match your myFuncCall region, so Vim does not know that
> there is anything special about it. You'll need to match generic
> function calls (or at least matched parentheses) in order for Vim to
> not match the first closing parenthesis as the end of region.
>
> --
> You received this message from the "vim_use" maillist.
> For more information, visit http://www.vim.org/maillist.php
>



-- 
Alessandro Antonello
-- 
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Reply via email to