-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
Improved search in "Go to file" panel #25925
Comments
We use the path only as tiebreaker, that makes filenames with non-consecutive matches win against paths with consecutive matches here. |
Also #35572 (comment) |
Thank you @bpasero. |
@grothkopp this is only an issue if your query happens to fully match on the file name. once your query has enough significant characters from the parent folders it should not happen anymore. |
@bpasero yes, but as my screenshot shows its easy to fully match the individual characters in long file names. And partial matches in filesnames still have precedence (see my screeshot: oneshotRecurringTask.class.php in lib/task ranks before _betrag.php in lioshop) There's also the issue with "greedyness" (the last p in php matching instead of the p in the path). |
I just noticed that adding a trainling slash after the directory name ( "lioshop/") solves the problem in the insider build. But I think thats more a workaround than a solution. |
@grothkopp yes good point, if you include a path separator, the matching on the file name alone will no longer happen. |
I would like to see us make progress here, but don't have the necessary time at the moment. Some care will be needed, because with large projects the sorting affects performance. |
I'm not sure if this should be a different issue, but I'd also like to see independent fuzzy finding for multiple words. This was added in sublime recently, and I miss it in other editors.
For a more specific example, I have some files in a |
Yes, #25925 (comment) should be covered with #30404 |
Any progress on this? It's been 3 years and Sublime still outclasses VSCode when it comes to fuzzy search matching in a intuitive way. Would be super awesome if more focus could be made on improving this. I think a lot of developers would appreciate it 👍 |
Is it possible to write an extension to replace the file search provider? I agree with many previous commenters that Sublime's gets it right so much more often than VS Code's... i really miss it. One piece of the algorithm that I think is sorely missing is that a search like |
Since users are more likely to jump to files related to the code they are currently editing, we could borrow some ideas from #80444, in particular, order by proximity to currently editing file would seem like a low hanging fruit I've had great success using fzf with proximity-sort |
I'm having similar needs as @pforhan . |
This is a good example, thanks for sharing. In both cases our algorithm prefers a better performing match in the file name over a match in the full path and that is the root cause of many issues. Addressing this would mean to give up on the separation between file name matches and path matches and focus only on path matches I think. |
@mrmachine a way to force VS Code into matching on the entire path is to separate segments with |
@bpasero yes, that works much better, thanks! I would not say that completely fixes the issue because it is still inconsistent with GitHub which is strange considering you can open VSCode directly in the browser from GitHub with |
I would also suggest that in response to your comment about the algorithm preferring a better match in the filename, that these "better" filename matches shown in my earlier screenshots are not actually better at all considering that pretty much ALL of the top matches include single isolated character matches in the middle of a word in the filename which is extremely low value. |
Would love to see a more accurate search for what I'm actually searching for. For example when I'm searching for "archive" and I'am in mid sentence i get these results:
I think, at least for me that the index.js inside the archive folder file is much more relevant than the .babelrc and yarn.lock. Sublime on the other hand does exactly what I want.
This change would make the workflow with VS Code even better than it already is 😄
The text was updated successfully, but these errors were encountered: