This is experimental.
—
`flex’ style, but with a better scoring algorithm. Specifically, it is non-greedy and ranks completions that match at word; path component; or camelCase boundaries higher.
Orderless completion style divides the pattern into space-separated components, and matches candidates that match all of the components in any order.
Hotfuzz and earlier (and slower) flx algorithm offer excellent sorting. It allows the user to **always type forward**. The score of target completion improves without manipulating the point or pressing C-p or C-n.
It sounds trivial, but as the user develops scoring intuition, it can feel quite magical.
The score based sorting can occasionally narrow to a target you didn’t intend, especially for a large array to complete against.
This is where orderless filtering comes in. The user can press space and type more words to filter the completions with orderless.
Orderless has builtin `orderless-flex’ style, which does matching without sorting. Sorting really is mandatory to make flex search useful.
Orderless also has builtin `orderless-initialism’ style, which completes strictly as initials, which is not flexible or powerful enough to be generally useful.
- Starting typing query, hotfuzz is used for superior sorting.
- Press space, and orderless takes over, but treats the first word before space as `orderless-flex’.
- Note this combination means completions can be filter by a list of space separated words (i.e. the default orderless usage). However, the first word has special powers.
`orderless-flex’ will redo the work hotfuzz did to filter the collection. In practice this is not noticeable.
- invert logic so orderless does filtering before hotfuzz does scoring
- remove duplicated work
- look into possibility of using historical items to give some hotfuzz scores a boost