Emacs 27: icomplete vs ido mode π
- This page is for Emacs 27 (Released 2020-08)
- For Emacs 28 (Released 2022-04) , see Emacs: icomplete vs ido mode π
What is the Difference Between Icomplete and Ido?
Icomplete for All Prompts, Ido for File/Buffer Commands Only
icomplete does name completion for any command that prompts for a list of choices in minibufer. They include:
execute-extended-command
describe-function
find-file
switch-to-buffer
dired
Ido only supports name completion for opening file or switch buffer commands:
find-file
switch-to-buffer
There is no config you can set to make other commands use ido completion.
Icomplete Needs Press Tab, Return, Ido Just Return
With icomplete, you have to press Tab first to βcompleteβ, then Enter, unless there is just one candidate left.
With ido, just press Enter, and the first candidate will be used.
Select Choices
icomplete keys for choice selection:
- Ctrl+. β next choice
- Ctrl+, β previous choice
- Ctrl+j β select current choice
Arrow keys do not work.
ido keys for choice selection:
- β β previous choice. (or Ctrl+,)
- β β next choice. (or Ctrl+.)
- Enter β select current choice
Icomplete: No Flex Matching
icomplete doesn't have flex matching. You have to type the first char of the name. However, it supports wildcard. For example, β*bβ will list βabcβ.
ido by default will match any substring. For example, typing βbβ will list βabcβ.
ido has ido-enable-flex-matching, so that it'll show candidates that contain the chars you typed. For example, βbdβ will list βabcdeβ.
Icomplete: No Smart Order of Candidates
ido will list the most recently used item first.
I recommend turning on both icomplete and ido.