Find and replace strings in vim on multiple lines

前端 未结 11 1825
耶瑟儿~
耶瑟儿~ 2020-12-02 03:29

I can do :%s///g for replacing a string across a file, or :s///

11条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-02 04:00

    You can do it with two find/replace sequences

      :6,10s///g
      :14,18s///g
    

    The second time all you need to adjust is the range so instead of typing it all out, I would recall the last command and edit just the range

提交回复
热议问题