Reputation: 2376
I want to save vim macro for reuse. Part of what I want to achieve is:
:s/\%Vsearch/replace/e
But the automatic insertion of selection range ('<,'>
) after :
is causing me issue. How can I disable it or bypassing it for this command?
Upvotes: 1
Views: 58
Reputation: 196576
Use <C-u>
:
:<C-u>s/\%Vsearch/replace/e
If you want to use <C-u>
in a saved macro you will need to use its literal notation, ^U
, that you can obtain by typing <C-v><C-u>
in insert mode.
See :h i_ctrl-u
.
Upvotes: 1