shortcut - In Vim, paste over text between two parenthesis? -


something find myself doing yanking text between 2 parenthesis , pasting on pair of parenthesis. example:

foo(int a, int b, int c) bar(int d, int e) 

becomes

foo(int a, int b, int c) bar(int a, int b, int c) 

is there quick way in vim yank text foo , paste on text in bar?

one way yi) inside foo's arguments , "_di)p within bar's arguments.

yi) yanks text inside parentheses

"_di)p uses null register delete text inside parentheses , pastes text, vi)p works , avoids null register

the thing changing function name though, yank line , use cw (change word) change foo bar.


Comments