Interactive search and replace from shell

前端 未结 8 1874
故里飘歌
故里飘歌 2020-12-29 12:32

Search and replace over multiple files is difficult in my editor. There are plenty of tricks that can be done with find, xargs and sed

8条回答
  •  死守一世寂寞
    2020-12-29 12:54

    KISS principle:

    vim
    :args `ls`
    :argdo %s#SEARCH#REPLACE#gec |update
    

    First character afer %s is used as separator

提交回复
热议问题