From fdd540f2bb3005a08d9c6f10c1ee7bab9c754647 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sun, 4 May 2014 23:38:22 -0400 Subject: Define km/recentf-ido-find-file-other-window --- lisp/init-ido.el | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'lisp') 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) -- cgit v1.2.3