On 01/18/2011 08:23 AM, Dennis Benzinger wrote:
How can I remove one call from nested function calls?

For example if I want to remove the call to function b from
a(b(c(1), 2), 3) so that I get either a(3) (Deleting the call and the
parameters) or a(c(1), 2, 3) (Deleting only the call and keeping the
parameters).

Can the nested-call be at any parameter position such as

  a(1, b(c(2), 3))

and can the nested function calls appear multiple times:

  a(b(c(2), 3), b(c(4), 5))

and can the nested function calls be arbitrarily deep:

  a(b(c(d(e(f(42, 1), 2), 3), 4), 5)

(and in this case which/how-many should be removed?)

Regexps aren't very good at handling nested aspects, so unless you know the depth of nesting ahead of time, it's a bit challenging.

With a little more constraint on the problem-space, it might e possible.

-tim

--
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

Reply via email to