I am using completion-styles
and cannot decipher the difference between flex
and initials
.
2 Answers
initials
matches "acronyms and initialisms", e.g., can complete "M-x lch" to list-command-history
and "C-x C-f ~/sew" can match "~/src/emacs/work".
flex
will match an in-order subset of characters. When completing "foo" the glob "*f*o*o*" is used, so that "foo" can complete to "frodo".
You can read more about these and other options (like basic
and substring
) from the docstring for completion-styles-alist
.
Orderless and Fussy are third-party packages to provide additional completion styles.
See the manual:
M-x emacs-index-search
RET completion-styles
RET takes you to (emacs)Completion Styles
, which says:
‘flex’
This aggressive completion style, also known as ‘flx’ or ‘fuzzy’ or
‘scatter’ completion, attempts to complete using in-order
substrings. For example, it can consider ‘foo’ to match ‘frodo’ or
‘fbarbazoo’.
‘initials’
This very aggressive completion style attempts to complete acronyms
and initialisms. For example, when completing command names, it
matches ‘lch’ to ‘list-command-history’.