tonio
tonio

Reputation: 2376

Disable selection range insertion in vim macro

I want to save vim macro for reuse. Part of what I want to achieve is:

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

Answers (1)

romainl
romainl

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

Related Questions