Sublime Forum

Find + Replace in multiple files

#1

I have 100 files and each one needs a piece of code to be updated. Is there a way in ST3 to find and replace across multiple files?

0 Likes

#2

In the menu, you can select Find > Find in Files... (see the menu for the key binding on your platform) which allows you to do this.

The option opens a panel at the bottom of the window where you can enter the text to search for, the text to replace with, and where to search. Pressing the Replace button will show you a dialog that tells you how many replacements will be made across how many files and asking you to confirm.

Optionally you can press Find first, which will show you all the files where matches are found (including telling you how many are searched so you can verify it’s doing what you want), and then follow up with the replacement when you’re sure everything is OK.

See the page in the Unofficial Documentation on Search and Replace in multiple files for more information.

1 Like