Vim - Search and replace the results

后端 未结 4 714
刺人心
刺人心 2021-02-13 05:13

I\'m getting more and more comfortable with Vim after a few months. BUT, there is only one simple feature I can\'t get any answer from the web. That is \"Search and replace the

4条回答
  •  灰色年华
    2021-02-13 05:59

    Move to the first highlighted word then record a macro for replacing the word and moving to the next one, e.g:

    gg
    n
    qq
    caw new_word^[
    n
    q
    @q
    @@
    @@
    ...
    

提交回复
热议问题