Reputation: 18710
I need to change occurrences of a term only in certain places in my project.
Is there a way in Sublime Text to navigate the search results (across an entire project) and only replace the occurrences of my choice?
⌘ShiftF opens the "search and replace" for the entire project, but the Replace
button only gives me the option to replace all occurrences.
Upvotes: 3
Views: 897
Reputation: 36
For posterity, the functionality to search/find and replace inside the open project does exist. ⌘ShiftF and add <open project>
to the Where
input field.
Upvotes: 1
Reputation: 10827
If you press the ... button in the search panel, a menu will open that allows you to refine your search. You can use the Where
input field with a search pattern, or some tags like <open-files>
.
http://docs.sublimetext.info/en/latest/search_and_replace/search_and_replace_files.html
Other than that, if you really need human input to decide where to replace and where not to replace, you can go to the next result by pressing Enter and pasting the code manually.
Just in case you didn't know: when you make a project search a new text file opens up with all the occurrences. You can click those occurrences to navigate to the file in question.
Upvotes: 1