3 ms·
At least on Edge, it got continuous substring matching right (illa shows vanilla), but failed to get the most important type of matching: arbitrary substring. N
by jakear 3y ago
At least on Edge, it got continuous substring matching right (illa shows vanilla), but failed to get the most important type of matching: arbitrary substring. Not a surprise, I only know a couple editors that support it. But it's truly the ideal form of filtering, especially when the entries are long. Think css, how much nicer would it be to type "mato" in devtools and get "margin-top"? Or, the ideal case that is somehow still missing – browser history entries: type the first char or two of the hostname, one or two from the path, and a couple form the query, and you've filtered everything down to just one or two options.
- xyzzy_plugh 3y ago> Think css, how much nicer would it be to type "mato" in devtools and get "margin-top"? I can't say that this type of search has ever crossed my mind. This type of search would seem to me to be greatly ambiguous. For example, if you have "tomato" in the corpus then that obviously supercedes "margin-top" for the search string "mato". If you know the entire corpus, then I suppose you can take advantage of shortcuts like this when you know there is only one match, but then again it would seem to me that simply writing "margin-top" would require less mental gymnastics.
- jakear 3y agoIf you've ever used any filtering in VS Code, this is the algorithm. Re tomato/margin-top, weight is given to matching the prefix exactly, so margin-top does indeed rank higher. https://github.com/microsoft/vscode/blob/main/src/vs/base/common/filters.ts#L350 https://github.com/microsoft/vscode/blob/main/src/vs/base/co...