I find myself sometimes having to rearrange arguments to functions in C-like languages. I.e. changing:
hello("world", makeExclamation(1), foo(bar(a, b, c)))
->
hello(foo(bar(a, b, c)), "world", makeExclamation(1))
If one changes the very first with the very last, copying the delimiter (,
) works quite well because it will be needed again where the argument is to be pasted. But in the case above the delimiter has to move to the other side of the yanked/cut string:
|, foo(bar(a, b, c))|
->
|foo(bar(a, b, c)), |
Generally I do this with the F
and f
command, but in a case like above that's not the most precise to use. Alternatively %B
also works to move to the beginning but also not always (e.g. if "foo" is also composite and has whitespace).
Is there a way to have a dedicated command to do this automatically or a nice shortcut I'm not aware of?
Note: I usually visual-cut-paste in case that's any difference (e.g. velldP
).