From 6481d0fa8cdfa1f5d239a618a88961f45f48b27c Mon Sep 17 00:00:00 2001 From: rekado Date: Mon, 4 Jul 2016 23:07:07 +0200 Subject: Revert "Remove ido." This reverts commit af48ee7c6e4ef551e387c8d37e7c85b392c36d88. --- init.el | 1 + lisp/init-ido.el | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 lisp/init-ido.el diff --git a/init.el b/init.el index a490836..f576da1 100644 --- a/init.el +++ b/init.el @@ -146,6 +146,7 @@ (load "email.el") (load "init-org.el") (require 'my/init-org) +(load "init-ido.el") (load "init-completion.el") (load "init-geiser.el") (load "init-gnus.el") diff --git a/lisp/init-ido.el b/lisp/init-ido.el new file mode 100644 index 0000000..5cbf566 --- /dev/null +++ b/lisp/init-ido.el @@ -0,0 +1,26 @@ +;; ido mode +(require 'ido) +(require 'ido-vertical-mode) +(ido-mode 1) +(ido-vertical-mode 1) +(setq ido-vertical-define-keys 'C-n-and-C-p-only) +(setq ido-ubiquitous-max-items 50000) +;; hit ~ to go straight to the home directory in ido mode +(add-hook 'ido-setup-hook + (lambda () + ;; Go straight home + (define-key ido-file-completion-map + (kbd "~") + (lambda () + (interactive) + (if (looking-back "/") + (insert "~/") + (call-interactively 'self-insert-command)))))) + +;; Use ido everywhere +(require 'ido-ubiquitous) +(ido-ubiquitous-mode 1) +(fset 'yes-or-no-p 'y-or-n-p) + +;; open file at point with C-x C-f +(setq ido-use-filename-at-point 'guess) -- cgit v1.2.3