summaryrefslogtreecommitdiff
path: root/lisp/init-ido.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/init-ido.el')
-rw-r--r--lisp/init-ido.el26
1 files changed, 26 insertions, 0 deletions
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)