So I want to start my question with an example:
In pretty well known extension for Visual Studio called Visual Assist there's a functionality for quick file searching. Which basically just creates the window where you can input some words to find the file you want to open, press enter and then file opens in a new tab. It looks basically like this:
I would like to point out that this functionality is already very useful as it is but the algorithm for searching which they use in my opinion is not perfect. Seemingly the current algorithm is:
- Split input to single words by whitespaces
- Show filenames which include all of the words, the arbitrary file is selected.
In my opinion this algorithm has at least two downsides:
- When I have files like
ColorfulWidget.cpp
,AwesomeColorfulWidget.cpp
,DivineColorfulWidget.cpp
(like 15 or more files with pattern*ColorfulWidget.cpp
) and I know that I want to haveColorfulWidget.cpp
open, using this kind of dialog becomes counterproductive because no matter what words I will input it will show all those files in the list and even though they are sorted, the needed one may be even not visible (because of scroll bar) - If you made any kind of typo empty list is shown and you have to look through your input carefully character by character to find it.
So my question is, are there any better algorithms (still not very complex perhaps) that could be used in similar kind of dialog?