How can I search and replace recursively in a directory in Vim?

前端 未结 7 711
抹茶落季
抹茶落季 2021-01-30 02:44

I found out about Vim\'s substitute command...

:%s/replaceme/replacement/gi

And vimgrep...

:vimgrep  /findme/gj  project/**/*.r         


        
7条回答
  •  滥情空心
    2021-01-30 02:54

    One way would be to open all the files you want to run the substitution on (or any command), and run :bufdo , which will run on all open buffers.

提交回复
热议问题