diff options
author | Kyle Meyer <kyle@kyleam.com> | 2014-05-04 23:38:22 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2014-05-04 23:38:22 -0400 |
commit | fdd540f2bb3005a08d9c6f10c1ee7bab9c754647 (patch) | |
tree | 92d539f27d43009e66a88195a3d201bf5d0e8c4a | |
parent | fadef39eb241201bef576651b7c40205af145b06 (diff) | |
download | emacs.d-fdd540f2bb3005a08d9c6f10c1ee7bab9c754647.tar.gz |
Define km/recentf-ido-find-file-other-window
-rw-r--r-- | lisp/init-ido.el | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/lisp/init-ido.el b/lisp/init-ido.el index be8f5f3..64417fc 100644 --- a/lisp/init-ido.el +++ b/lisp/init-ido.el @@ -40,11 +40,22 @@ (defun km/recentf-ido-find-file () "Find a recent file using ido." (interactive) - (-when-let (file (ido-completing-read "Choose recent file: " - recentf-list nil t)) + (-when-let (file (km/read-recent-file)) (find-file file))) +(defun km/recentf-ido-find-file-other-window () + "Find a recent file in other window using ido." + (interactive) + (-when-let (file (km/read-recent-file)) + (find-file-other-window file))) + +(defun km/read-recent-file () + (ido-completing-read "Choose recent file: " recentf-list nil t)) + (key-chord-define-global ",r" 'km/recentf-ido-find-file) +;; Remap find-file-read-only-other-window to free up "r". +(define-key ctl-x-4-map "R" 'find-file-read-only-other-window) +(define-key ctl-x-4-map "r" 'km/recentf-ido-find-file-other-window) (key-chord-define-global ",b" 'ido-switch-buffer) (provide 'init-ido) |