People more knowlegable than I have suggested that intelligent fuzzy matching and sorting for both minibuffer completion and in-buffer completion could be accomplished by implementing a
A style that can match according to an arbitrary predicate and can sort according to an arbitrary comparison function would be ideal.
completion-stylesis a variable defined in
minibuffer.el. Its value is
(basic partial-completion emacs22)
Documentation: List of completion styles to use. The available styles are listed in
completion-category-overridesmay override these styles for specific categories, such as files, buffers, etc.
You can customize this variable.
This variable was introduced, or its default value was changed, in version 23.1 of Emacs.
How can this be achieved?
There is a lot of interest in this problem:
- [Github] Adding fuzzy matching to
- [Github] Implementing a completion style for
- [Emacs.SE] How can I get fuzzy code completion
- [Superuser] Is there emacs plugins to do Sublime-like completion and goto anything?
- [SO] Emacs fuzzy autocompletion
- [Emacs ML] fuzzy auto-complete via
- [Reddit] Auto-complete with flex/ido-like matching?
- Of course, I'm not sure if anyone wants to use this without a framework, but you absolutely could.