Sublime text 2 - find and replace globally ( all files and in all directories )

ReplaceIdeFindSublimetext2Global

Replace Problem Overview


Is there any way to find and replace text string automatically in all folder's files?

Replace Solutions


Solution 1 - Replace

Yes, there is Multiple Files search and replace.

Press ctrlshiftF (cmdshiftF on MacOS):

enter image description here

In the Where field you can also add filters to search only folders and files that you need. If nothing is set, the search is made on all files listed in the sidebar.

If you double click on a line of the search result, Sublime will jump to that line.

Notice these icons in the search bar:

enter image description here

The first (show context) toggles context in result format (if enabled, some lines of text are shown before and after the matching line). The second allows to show the result in a new buffer, or in a console.

Solution 2 - Replace

Press ctrlshiftF (cmdshiftF on  Mac OS X :) and then put *.* in the where: field

This will open the search up to all files in the project as opposed to only open files or folders.

You can also use this to search only files of a certain type, or with a certain name regardless of type. It's just wildcards for the filename and extension.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionitsmeView Question on Stackoverflow
Solution 1 - ReplaceRiccardo MarottiView Answer on Stackoverflow
Solution 2 - ReplaceMike LyonsView Answer on Stackoverflow