Sublime Forum

Find in Files -> Replace stuff -> how to save? Save all not working

#1

So my problem is that I have to replace a lot of stuff in a lot of files at once, how can I apple the replace-s do the files in Find results? Currently, I have not found a solution in Sublime or different plugins/packages.

0 Likes

#2

How are you performing the operation? It seems to work OK for me here. Are you perhaps accidentally editing the results in the find results tab?

From the Find in files panel, enter the text to find, the replacement text, and select the appropriate Where to search for the files in, and then click the Replace button on the right hand side. You should get a popup asking you to confirm that you want to “Replace XX occurrences across XX files?”. Once you click replace and the operation is done, File->Save All should save all of the changed files (which are opened for your perusal).

For safety it may be a good idea to click Find first, to see the list of results and make sure that it’s only going to replace what you want, and then go back to the panel and click Replace to actually perform the operation.

2 Likes

#3

I made changes to about 5,000 files (find and replace). I thought they had been saved, but when I tried to quit Sublime Text, it asked me to save them – one by one. Saving a file was slow and it would have literally taken hours to save them all. I tried “Save All” but to no avail. A panel kept popping up asking me to save each file individually. I eventually had to force Sublime Text to quit and lost all the changes.

This is really disappointing behaviour.

0 Likes