Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find in files within scope selector #6530

Open
keith-hall opened this issue Nov 7, 2024 · 0 comments
Open

Find in files within scope selector #6530

keith-hall opened this issue Nov 7, 2024 · 0 comments

Comments

@keith-hall
Copy link
Collaborator

keith-hall commented Nov 7, 2024

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... #4367

Additional Information

  • forum post
  • sometimes plugins like AutoSetSyntax are able to do a much better job of deciding what syntax to open a file as than ST's limited first_line_match and file name/extension mapping. It would be great if that was somehow taken into account too...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant