How to do search & replace with ack in vim?

后端 未结 5 478
天命终不由人
天命终不由人 2020-12-07 08:43

I am using the Ack plugin in Vim, which helps me to quickly search for strings in my project. However, sometimes I want to replace all or some occurrences of the found strin

5条回答
  •  [愿得一人]
    2020-12-07 09:11

    You could using ack by this way

    :args `ack -l User app/`
    :argdo %s/, :expire.*)/)/ge | update
    

    Or use ag

    :args `ag -l User app/`
    :argdo %s/, :expire.*)/)/gec | w
    

提交回复
热议问题