LaserFace wrote:I don't have the sidebar enhancements. But I just found that if I go to Find > Find In Files (Ctrl + Shift + F), type in the string to find, click the ellipses and add whatever folders and files you want, and then click the ellipses again and add an exclude filter and type in the file names of files you don't want to replace the string with, and it worked for me.
Not sure how well this method is for really large projects. It would be nice to add some more functionality to the 'exclude filter' option so that you can select from a list what you want to exclude, but not sure if that plugin has been written yet...
Yeah, that's what I have been doing as well. It basically forces you to search twice, though.
1. Seach for "foo", see in results that it exists in files in folders A, B and C. If you just want to replace the occurrences in A and B
2. search again, excluding C, and replace.
But what if I want to replace "foo" in just a few files in folder A, not in all of them. Then I have to open them all individually, as eyewinder mentioned.
I think Textmate's solution for this is really nice, where you can select individual files or whole folders in the search results and just do the replace on them.