Interactive search/replace regex in Vim?

前端 未结 7 2030
夕颜
夕颜 2020-12-12 10:05

I know the regex for doing a global replace,

     %s/old/new/g

How do you go about doing an interactive search-replace in Vim?

7条回答
  •  离开以前
    2020-12-12 10:08

    If your replacement text needs to change for each matched occurrence (i.e. not simply choosing Yes/No to apply a singular replacement) you can use a Vim plugin I made called interactive-replace.

提交回复
热议问题