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

Suggested Enhancement: Find in Files #3

Open
Wrongtown opened this issue Nov 3, 2021 · 6 comments
Open

Suggested Enhancement: Find in Files #3

Wrongtown opened this issue Nov 3, 2021 · 6 comments
Labels
enhancement New feature or request

Comments

@Wrongtown
Copy link
Contributor

See Ctrl+Shift+F in Sublime Text. I'm sure this is non-trivial but damn it's useful.

@blakjakau
Copy link
Owner

@Wrongtown is this conceptually an index across all appropriate files in all workspace folders?

@blakjakau blakjakau added the enhancement New feature or request label Nov 12, 2021
@Wrongtown
Copy link
Contributor Author

Wrongtown commented Jan 17, 2022

Sorry mate, completely missed this question.

That's correct, for example the attached screenshot is a search for the string password in any .txt or .csv files (but explicitly not in any .xlsx files) contained within three specific subfolders of C:\git.

2022-01-17_185343

@blakjakau
Copy link
Owner

blakjakau commented Mar 6, 2022

@Wrongtown I don't have sublime text easily to hand on any of my dev machines ATM. what is the output of this function? does it provide a list of all files with the text? does it open buffers for all files with the text?

Given the ideal to keep Code as light as possible, I'm hesitent to explore options of pre-indexing file contents at all, but I'm not sure if the per-use time cost of doing the find operation live (without access to CLI grep, etc) would make the feature fast enough to be worthwhile.

@blakjakau
Copy link
Owner

blakjakau commented Mar 9, 2022

@Wrongtown, I'm working towards finding text in all files that are supported by the editor (skipping binaries, archives etc) with a configurable include/exclude filter on the omnibox, and with results being rendered progressively as the find function does it's thing.

A little unsure about the output of the find results, currently just listing the files (per the goto-file results), but might be more useful to include a snippet of text? Maybe the file path, and the first hit in the file, with ~50 character either side of the match?

I tend to work on SSHFS mounted filesystems, so performing the lookup can be pretty slow on big or even modestly sized project folders.

@blakjakau
Copy link
Owner

Hey @Wrongtown I've created a branch for this feature. It's sort of working, the performance isn't bad on a local file system , though kind of apalling on remote... there's a hacked together "include/exclude" filter and it only looks in supported files to begin with. It's very much a rough approximation UI-wise at this point, but do you wanna check out the branch and take a look?

@Wrongtown
Copy link
Contributor Author

Sorry @blakjakau I totally spaced on these, currently the number of new github repos spinning up for my day job resembles a girthy firehose so I reckon I missed them in the mix 😅

Happy to do so, may have questions as to how to execute locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants