Emacs: icomplete vs ido mode, emacs 27
This page is for emacs version 27. For emacs 28, 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:
Ido only supports name completion for opening file or switch buffer commands:
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.
icomplete keys for choice selection:
- Ctrl+. → next choice
- Ctrl+, → previous choice
- Ctrl+j → select current choice
Arrow keys does 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.