9 votes
 
when I do a replace with "Find in Files" Sublime will open ALL the matching files, do the replacements, and then leave the files in there unsaved. How do I stop that? I have just had to close manually 642 files.


Ideally, there'd be a setting / option / tickbox to do the replacements in place.

 
0
Russell Keith-Magee
Agreed. This is one of several improvements needed to make Find and replace across files work for large projects. See also this ticket and this one
Translation provided by Microsoft translator:

 
0
Sven Axelsson
Save All and Close All Files makes this process less painful though.
Translation provided by Microsoft translator:

 
0
Jay Baird

This is even worse when you have to find/replace using regex across 30,000 files and 10,000+ files of those need to be replaced.

Translation provided by Microsoft translator:

 
+1
Sven Axelsson

That certainly sounds painful enough that I'd never even attempt it using any editor. There are other tools suited to such tasks.

Translation provided by Microsoft translator:

 
0
Jay Baird

I understand that, but Sublime Text should be able to handle this. Visual Studio has a checkbox in their Replace In Files dialog called "Keep Modified Files Open After Replace All" and when you uncheck this it will just auto-save the files for you instead of opening them all and doing as you wish with them; Sublime Text needs the same functionality.

Translation provided by Microsoft translator:

 
0
Stef

I just had the painful experience of this after my computer crashed trying to open several thousand files.

Translation provided by Microsoft translator:

 
0
Julian Alison Jorgensen

Indeed! Shouldn't be too hard a feature to implement.

Translation provided by Microsoft translator:

Community stats

  • 27,580People
  • 3,828Feedback
  • 5,698Comments
  • 64,509Votes