Hi Peter,
It can (see below), but then again, the other text objects could be
implemented as vimscript as well. Extending the existing text objects to
include parameters seems like a natural fit.
David
nmap <silent> cim :call ChangeInnerParam()<cr>
function ChangeInnerParam()
call s:selectInnerParam()
normal x
startinsert
endfunction
function s:selectInnerParam()
call search('[(,]', "bW")
normal lv
call search('[(,)]', "W")
let c = getline(".")[col(".")-1]
if (c == '(')
" skip over a nested param list
normal %
call search('[,)]', "W")
endif
normal h
endfunction
-----Original Message-----
From: Peter Hodge [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 15, 2007 4:34 PM
To: Larson, David; [email protected]
Subject: Re: new text object feature request
--- "Larson, David" <[EMAIL PROTECTED]> wrote:
> I often need to replace parameter text and usually try to remember the
> text object that selects the "inner parameter", only to come up short
> since that type isn't defined. It seems natural to have a "parameter"
> text object, where it would act on the text between commas or
> parentheses, i.e. from "(," to ",)".
>
> What say you? Something worthy of the todo list?
Hello,
I believe that can be done using Vimscript, so you could try that first.
regards,
Peter
________________________________________________________________________
___________
How would you spend $50,000 to create a more sustainable environment in
Australia? Go to Yahoo!7 Answers and share your idea.
http://advision.webevents.yahoo.com/aunz/lifestyle/answers/y7ans-babp_re
g.html