This is a mirror of http://www.vim.org/scripts/script.php?script_id=2699
This plugin provides a text-object 'a' (argument). You can
d(elete), c(hange), v(select)... an argument or inner argument in familiar ways.
That is, such as 'daa'(delete-an-argument) 'cia'(change-inner-argument) 'via'(select-inner-argument).
What this script does is more than just typing
F,dt,
because it recognizes inclusion relationship of parentheses.
There is an option to descide whether the motion should go out to toplevel function or not in nested function application.
Examples:
case1) delete An argument
function(int arg1, char* arg2="a,b,c(d,e)")
function(int arg1)
function()
case2) change Inner argument
function(int arg1, char* arg2="a,b,c(d,e)")
function(int arg1, )
case 3) smart argument recognition (g:argumentobject_force_toplevel = 0)
function(1, (20*30)+40, somefunc2(3, 4))
function(1, , somefunc2(3, 4))
function(1, (20*30)+40, somefunc2(3, 4))
function(1, (20*30)+40, somefunc2(4))
case 4) smart argument recognition (g:argumentobject_force_toplevel = 1)
function(1, (20*30)+40, somefunc2(3, 4))
function(1, , somefunc2(3, 4)) " note that this result is the same of above.
function(1, (20*30)+40, somefunc2(3, 4))
function(1, (20*30)+40, ) " sub-level function is deleted because it is a argument in terms of the outer function.