Emacs: icomplete vs ido mode
What's the Difference Between Icomplete and Ido?
Icomplete for All Prompts, Ido for File/Buffer Commands Only
icomplete and ido are both bundled with emacs.
icomplete does completion for any command that prompts for a list of choices.:
The emacs commands that icomplete will be active Includes:
Ido only supports file/buffer related commands:
There is no config you can set to make other commands use ido completion.
Icomplete Needs 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.
What's the Difference Between iswitchb and ido mode?
See: Emacs: iswitchb vs ido mode.