Vscode: Improved search in "Go to file" panel

Created on 4 May 2017  路  14Comments  路  Source: microsoft/vscode

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:

image

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.

image

This change would make the workflow with VS Code even better than it already is 馃槃

feature-request quick-pick search

Most helpful comment

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 馃憤

All 14 comments

We use the path only as tiebreaker, that makes filenames with non-consecutive matches win against paths with consecutive matches here.

Thank you @bpasero.
I like to add that lots of web frameworks like symfony have lots of files with identical names in different directories (indexSuccess.php, etc).

@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.
https://forum.sublimetext.com/t/dev-build-3154/33286

Also changed in 3154 is the fuzzy matching algorithm (as used by the Command Palette and Goto Anything), where you can now enter space separated terms, and each will be matched independently. e.g., "hw" will match "Hello World", and now "w h" will also match it (but "wh" would not).

For a more specific example, I have some files in a /reducers directory, and whenever I want one I usually type user reducer, and since reducer is before user in the file path, the file isn't found.

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 hw should match hello_world.py better than it matches howto.py, by recognizing that underscores (or camelcase, etc) are natural word breaks and first letters of words are more important than others...

Another example screenshot showing that path names should not be used just as tie breakers. Path name exact string matches should appear higher than simply finding all the letters somewhere in the filename. This is just confusing:

image

Is there a separate issue about sorting case-sensitive matches higher? Let me know.
For example, I'd like to see HelpAppletClientActionTranslatorTest bubble up to the top here:
image

Was this page helpful?
0 / 5 - 0 ratings