summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2015-02-04 01:06:13 -0500
committerKyle Meyer <kyle@kyleam.com>2015-02-04 01:06:13 -0500
commit4687edf46cbdf24bb29d15b313533ca77fc9c422 (patch)
treecea8bf4ac93bffac24bd89099f6a790880ee63ca
parent3e57a654519e5e7af1e84504edb2ea37aba3b052 (diff)
downloademacs.d-4687edf46cbdf24bb29d15b313533ca77fc9c422.tar.gz
Add dired-view-file-other-window command
-rw-r--r--lisp/init-dired.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/lisp/init-dired.el b/lisp/init-dired.el
index 7c40a06..cbded0f 100644
--- a/lisp/init-dired.el
+++ b/lisp/init-dired.el
@@ -58,9 +58,16 @@
(yes-or-no-p (format "Open %s files?" num-files)))
(--each files (org-open-file it in-emacs)))))
+(defun km/dired-view-file-other-window ()
+ "In Dired, view this file in another window."
+ (interactive)
+ (view-file-other-window (dired-get-file-for-visit)))
+
;; This overrides the binding for `list-directory'.
(define-key dired-mode-map (kbd "C-c C-b") 'dired-up-directory)
(global-set-key (kbd "C-x C-d") 'km/dired-switch-to-buffer)
+;; This overrides `dired-do-run-mail'.
+(define-key dired-mode-map "V" 'km/dired-view-file-other-window)
(define-key ctl-x-4-map "D" 'km/dired-switch-to-buffer-other-window)