I have the following situation a lot, where I always end up having to yank two things in a row: For example, I want to yank a function call:
func(a, b)
Okay, here I can go to f
and press vf)
.
But when the call is nested, this does not work anymore:
func(gunk(a), b)
Here I always end up going to for example b
, doing da(
, then move to where I want to paste it, then move back to func
, do diw
and move AGAIN to where I pasted (gunk(a), b)
.
Instead, I would like to do vi(
to select (gunk(a), b)
and then somehow extend the selection to the left by one word, so and up with the complete func(gunk(a), b)
as the selection.
Is there a way to do that which does not involve writing a custom function to add to the .vimrc?