In my specific case I have
(function(){
and I want to replace that with
<whitespace char>xxx<whitespace char>
so it would go from
$('#myId').click(function(){do_something()})
to
$('#myId').click xxx do_something()})
I’ve tried
:s%/(function(){/ xxx /g
but it throws an error
throws an error ‘E486: Pattern not found’ even though I can find just /(function(){/. Nor does trying to add a \s to the replacement text work.
(sorry about the weird formatting of this question. doesn’t really flow well)
transposed the s and %
should become
I tried it and it works for me.
the former returns
E486: Pattern not found: /(function(){/ xxx /g