Ido doesn't have very smart fuzzy matching by default. Essentially, if you put in
Ido will try to match
against its candidates. This isn't really how we think about matching, since we would expect a file literally called
horse-feathers.txt to score higher than
Check out the
flx-ido package. From the readme:
The sorting algorithm is a balance between word beginnings
(abbreviation) and contiguous matches (substring).
The longer the substring match, the higher it scores. This maps well
to how we think about matching.
In general, it's better form queries with only lowercase characters so
the sorting algorithm can do something smart.
For example, if you have these files:
If the search term was pre-mode, you might expect "prelude-mode.el"
to rank higher. However because the substring match "re-mode" is so
long, "clojure-mode.el" actually scores higher.
Here, using premode would give the expected order. Notice that the "-" actually prevents the algorithm from helping you.
Flx always folds lowercase letters to match uppercase. However, you
can use uppercase letters for force flx to only match uppercase.
This is similar to Emacs' case-folding. The difference is mixing in
uppercase letters does not disable folding.
completing file names
Matches within the basepath score higher.