slime-fuzzy implements yet another symbol
[Somebody please describe what the algorithm actually does]
It attempts to complete a symbol all at once, instead of in pieces.
For example, “mvb” will find “
“norm-df” will find
The algorithm tries to expand every character in various ways and rates the list of possible completions with the following heuristic.
Letters are given scores based on their position in the string. Letters at the beginning of a string or after a prefix letter at the beginning of a string are scored highest. Letters after a word separator such as #\- are scored next highest. Letters at the end of a string or before a suffix letter at the end of a string are scored medium, and letters anywhere else are scored low.
If a letter is directly after another matched letter, and its intrinsic value in that position is less than a percentage of the previous letter's value, it will use that percentage instead.
Finally, a small scaling factor is applied to favor shorter matches, all other things being equal.
slime-complete-symbol-functionto this command, fuzzy completion will also be used for M-TAB.