 ;; Use ido for even more things than ido-everywhere
 (use-package crm-custom
   :config
-  (crm-custom-mode t))
+  (crm-custom-mode 1))
+
+(use-package ido-completing-read+)
+
+(use-package ido-vertical-mode
+  :bind (:map icomplete-minibuffer-map
+              ("<down>" . icomplete-forward-completions)
+              ("C-n"    . icomplete-forward-completions)
+              ("<up>"   . icomplete-backward-completions)
+              ("C-p"    . icomplete-backward-completions)
+              ("C-v"    . icomplete-vertical-toggle)))
+
+(use-package icomplete-vertical)
+
+;; Convenient iMenu entry search
+(use-package imenu-anywhere
+  :bind (("C-\\" . imenu-anywhere)))
+
+;; Turn on iMenu for code outlines for all prog and text modes, if possible
+(dolist (hook '(prog-mode-hook text-mode-hook))
+  (add-hook hook (lambda () (ignore-errors (imenu-add-menubar-index)))))
 
 ;; More sensible begin and end in certain modes
 (use-package beginend


;; Enhances ido and isearch's fuzzy search
(use-package flx-ido
  :config (flx-ido-mode t))

(use-package flx-isearch
  :bind (("C-M-s" . flx-isearch-forward)
         ("C-M-r" . flx-isearch-backward))
  :config (flx-isearch-mode t))

;; Use ido with M-x
(use-package amx

;; Turn on subword mode and linum mode for all prog and text modes
(dolist (hook '(prog-mode-hook text-mode-hook))
  (add-hook hook (lambda ()
                   (subword-mode 1)
                   (if (fboundp 'display-line-numbers-mode)
                       (display-line-numbers-mode 1)
                     (linum-mode 1)
                     ;; Renumber the current buffer after reverting the buffer
                     (add-hook 'after-revert-hook 'linum-update-current)))))

