Using ido for Emacs completion

I’m a heavy user of ido – it handles all of my completion, whether execute-extended-command, find-file, or whatever else. However, ido’s default configuration leaves much to be desired:

  • The way it displays results by default is quite difficult to read, as you can’t quickly skip your eyes to the next item when they’re all listed in a single wrapped line.
  • The default completion is prefix-only
  • It’s not obvious how to make ido actually complete everything

Fortunately this is all quite fixable with a few packages and a little configuration:

  • ido-everywhere, when set to t, puts ido in more places than the default.
  • ido-virtual-buffers doesn’t fix anything per se, but it does add recentf files to find-file completion, which is really handy.
  • ido-vertical-mode makes ido display each result on its own line, with a configurable amount of lines to display at a time (though I just use the default).
  • flx-ido fixes the completion by using the flx completion engine.
  • ido-hacks and ido-ubiquitous together make ido complete everything I’ve wanted so far.

My full ido configuration is as follows:

(use-package ido :quelpa :config
  (setq ido-auto-merge-delay-time 99999999)
  (setq ido-everywhere t)
  (setq ido-virtual-buffers t)
  (ido-mode))
(use-package flx-ido :quelpa :requires ido :config (flx-ido-mode))
(use-package ido-vertical-mode :quelpa :requires ido :config (ido-vertical-mode))
(use-package ido-hacks :quelpa (:stable nil) :requires ido :config (ido-hacks-mode))
(use-package ido-ubiquitous :quelpa :requires ido :config (ido-ubiquitous-mode))

Enjoy!

If you’d like to leave a comment, please email benaiah@mischenko.com