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

itsme picture itsme · Jan 1, 2013 · Viewed 87.1k times · Source

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

Answer

Riccardo Marotti picture Riccardo Marotti · Jan 1, 2013

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.