Search code examples
replaceidefindsublimetext2global

Find and replace globally in Sublime Text 2 (all files and in all directories)


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


Solution

  • Yes, there is Multiple Files search and replace.

    Press Ctrl + Shift + F (Cmd + shift + F 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 Text will jump to that line.

    Notice these icons in the search bar:

    Enter image description here

    The first (show context) toggles the context in the 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.