Emacs: Icomplete, Minibuffer Name Completion

By Xah Lee. Date: . Last updated: .

This page is for Emacs 28 (Released 2022-04) or later.

What is icomplete-mode

icomplete-mode enhances emacs's name completion when in minibuffer prompts.

icomplete does completion for any command that prompts for a list of choices, such as opening a file, switch buffer, calling a command by name.

Examples of commands that icomplete has effect:

Alt+x icomplete-mode

Turn on or off enhanced completion in minibuffer.

  • Press Tab to complete.
  • press Ctrl+j to select current choice and submit.
  • press Enter to submit what's in minibuffer.
emacs 29 icomplete mode 2023-08-24 rWGf
emacs 29 icomplete mode 2023-08-24 rWGf

icomplete-vertical-mode

Alt+x icomplete-vertical-mode
  • Activates icomplete-mode
  • Change settings to show choices vertically.
  • Call again to toggle vertical display to horizontal.

icomplete-vertical-mode is new in Emacs 28 (Released 2022-04)

emacs 29 icomplete vertical mode 2023-08-24
emacs 29 icomplete vertical mode 2023-08-24

icomplete keys

Tab
Complete what you typed.
Space
Complete up to a word.
Enter
Use what you typed so far.
Ctrl+jicomplete-force-complete-and-exit
Use first choice and exit.
Ctrl+,icomplete-backward-completions
complete backward
Ctrl+.icomplete-forward-completions
complete forward
【M-p】
previous-history-element
【M-n】
next-history-element

History of Icomplete Mode

icomplete is originally written by Ken Manheimer, first released in 1993. (Ken Manheimer's home page: http://myriadicity.net/https://x.com/myriadicity )

Emacs, minibuffer name completion

Emacs, name completion