Closed bbatsov closed 11 years ago
The sorting algorithm tries to balance between word beginnings and contiguous matches. The longer the substring match, the higher it scores. This is a corner case where "re-mode" is just too good a substring match.
If we adjust the scoring, I'm sure other corner cases will pop up.
In general, it's better to not use word separators and let the algorithm do something smart. Here, "premode" would give you the order you expected.
Maybe such details about the work of the algorithm should be mentioned in the README?
Thanks!
Given those two files:
~/projects/clojure-mode/clojure-mode.el
~/projects/prelude/core/prelude-mode.el
and the search text
pre-mode
, the first file gets selected by flx, although I think it should be the second one.