I would like to replace a multiline block to one line
for example :
if (... ){
//comment0
line1
line2
}
some code
if (... ){
//comment0
line1
line2
}
into:
if_function()
some code
if_function()
is there a fast way to do this? I tried to yank the block into register
shift+V
4j
"fy
and then replace, but I don't know how to reference the register tried:
%s/@f/if_function/g
and
%s/\@f/if_function/g
and
%s/"f/if_function/g
and
%s/\"f/if_function/g
but they all doesn't work