Open Wrongtown opened 3 years ago
@Wrongtown is this conceptually an index across all appropriate files in all workspace folders?
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.
@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.
@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.
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?
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.
See Ctrl+Shift+F in Sublime Text. I'm sure this is non-trivial but damn it's useful.