rking / ag.vim

Vim plugin for the_silver_searcher, 'ag', a replacement for the Perl module / CLI script 'ack'
1.74k stars 131 forks source link

Project Wide Search and Replace #130

Closed sittim closed 8 years ago

sittim commented 8 years ago

It would be awesome to provide a command, or a recommended method in this plug-in to allow project wide search and replace.

I needed to do a project wide search and replace. Ag seemed to be a natural choice, but there is really no reliable way to do it. I tried the Qfdo method (https://github.com/karlbright/qfdo.vim), but it did not work so I had to use sed in the terminal.

losingkeys commented 8 years ago

Try :cdo or :ldo. You might need a newer version of vim for this (I'm not sure when these commands were added). I have them in 7.4.1689.

sittim commented 8 years ago

Yes, :cdo does work...

http://vi.stackexchange.com/questions/6485/project-wide-replace-using-ag