-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
Alternative fuzzy searching #968
Comments
Thanks for the pointer. I'm very interested in 'adoption blockers' and in tuning our quick open even more. We should definitly look into this. |
For december I actualy tweaked the quick open search algorithm to include more results. Before we would not match a file There are more things we can do to come closer to what Sublime/Atom do:
I am happy to work on this and give it a try. I am not sure we need to make this an option as long as the most relevant results are sorted to the top. |
We talked about this at lunch and have an idea how we could make some progress here and get feedback:
|
👍 |
Another place I was noticing there was an incosistency with TypeScript suggestions, where if I didn't have the proper capitalization, results would disappear. I'm not sure if that should be a new issue or not. Most atom plugins, for example |
It is a good point that we have more places in the UI where fuzzy matching can apply and just introducing a new quick open provider for fuzzy matching file matches is not enough in that case. Given that, having a global option to enable fuzzy matching for all places (file search, goto symbol, intellisense) is probably the better option. |
@david-driscoll can you share an example of where intellisense did not return results when you expected them? |
That's a very good question, I just tried to see if I could replicate the behavior I was seeing, and I was not able to get it to happen anymore. To be fair I use vs code fairly irregularly, so it's possible it was fixed in the version I just updated too. I'll try again tonight from my laptop, which is where I saw the issue in the first place. |
@david-driscoll thanks. what I am trying to understand is if fuzzy matching should be applied to anywhere in the UI including intellisense, or selectively, starting with the picker. While I can see the value for the picker, I am not yet convinced for intellisense because I feel that I would never type a sub-string of a method to complete, I would always start with the first letters. And we do have camel case matching, so you can still type the upper case letters of a type to complete it, so we are having something very similar there. |
From a "feeling" point of view I shared many of the same principles that were ingrained from VS / R#. Then once I started dog-fooding atom building By letting fuzzy search everywhere even if you only know a few characters in the method, you can find the result with some insane speed and precision once you get used to it. There are some problems too, because when you're filtering large lists, you're expanding the result set as well, which could have performance implications as well. I'm not saying it is for everyone, and I'm not even sure if it fits the "vision" for vscode that the team has, that's up to you guys to decide. 😄 |
I have pushed a change to enable fuzzy searching for file matching in quick open. I decided to not touch any other UX area until we get some feedback on the sorting and matching. The new option is I see the request for broadening fuzzy matching to other places of the UI but I am not yet convinced we should do that. I played around with fuzzy matching in the command palette and was not happy with it. The issue with fuzzy matching is that you also need to do fuzzy sorting: more relevant results to the top. However for the command palette we chose to sort entries by name to keep the result list stable and memorable. Enabling fuzzy for commands would change the sort order for each search you do making it harder to learn the list of available commands. |
+1 to fuzzy matching file path, extensions and partial names. I can't find |
@mohsen1 this will be available in our December release, the commit you are on was a bugfix release only. |
Closing to reflect the work that was done. Suggest to open individual issues for bugs around the implementation and requests to broaden fuzzy searching to other places. |
@bpasero I'm also very interested in seeing file paths to be included into the quick search. We have lots of |
@alexgorbatchev the code that matches on file paths lives in https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/services/search/node/fileSearch.ts#L234 When you enable the new |
We decided to make fuzzy matching the default for our next release and remove the need of setting this option. |
Whatever fuzzy matching is VSC using, it's just bad compared to atom or ST. When searching for
|
@fxck with our upcoming release we fixed the space issue (1). Intentionally we are not finding results that have wrong order of characters, so yes there is a difference. |
Is Intellisense fuzzy completion planned? being able to type 'pln' to get 'println' is engrained in me from ST... |
^^^ Yes please. Fuzzy code completion would be awesome. |
An example I'd love to see improved is a situation where you're typing the first characters of multiple files in a path. Here's an example where I'm trying to get to Other editors such as Sublime and PyCharm would choose the file I'm looking for, but VSCode doesn't seem to. I would recommend that the scoring system takes into account a couple of things:
I feel like taking these two things into account would drastically improve the fuzzy searching. I would like to see the fuzzy search system in general be pluggable as the OP demonstrates, that would allow for personal preferences to be taken into account much more easily. |
My two cents to haet the discussion. I am trying to use the If I want to look for a word, I always use it's leading characters, for It makes more sense ( |
So 2c here: |
I was wondering if there is any update to this? I did look around before posting here, but couldn't see anything. Apologies if there's a better place for this. Coming from Sublime, I find myself typing what I think is quite file-specific paths but the ordering throws me off. Here's an example: I want |
Ditto - the file I'm after is regularly listed last, with crazy matches coming up first (like with the screenshot by danielsamuels). Any chance we can reopen? |
"crazy matches" doesn't even come close to describing my experience with this finder. Often, I specify the folder and file name (eg "moo-cow\element.ts") and the file I want might be in the list, but with the most relevant data out of view (because the path is long) and it's not at the top -- it's often somewhere in the middle, whilst letters out of the path I've provided are singly matched to letters within other paths. There really needs to be some ranking algorithm applied to the match results such that matches for the full string, in order, that I've typed in are right at the top. |
I've raised a new issue: #35572 |
My single biggest favorite feature with Atom, that really keeps me from using vscode all that much, is atom's amazing fuzzy searching.
They have a package fuzzaldrin that does an amazing job at handling missed characters, and just getting to the result you need with ease.
Is the vscode team open to extending how fuzzy searching works, perhaps adding an option to define an alternative scoring function, as part of a users profile?
The text was updated successfully, but these errors were encountered: