sublimehq / sublime_text

Issue tracker for Sublime Text
https://www.sublimetext.com
814 stars 40 forks source link

Find in files within scope selector #6530

Open keith-hall opened 2 weeks ago

keith-hall commented 2 weeks ago

Problem description

Sometimes it is useful to perform a find in files search only for variables, or only for comments, or to exclude strings etc. Having to craft the right regex for this can be extremely hard work, especially if your codebase consists of multiple programming languages.

Preferred solution

A new panel, very much like the Find in Files panel, but with an additional input field - a scope selector to perform the search in. Equivalent to opening the file, selecting all text matching a scope selector and performing a search inside the selection.

Alternatives

If syntax highlighting could be applied to search results, it could be done as a post regex search step in the Find Results buffer... But I understand that isn't likely to ever happen... https://github.com/sublimehq/sublime_text/issues/4367

Additional Information