summaryrefslogtreecommitdiff
path: root/lisp/init-buffile.el
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2014-08-28 23:20:54 -0400
committerKyle Meyer <kyle@kyleam.com>2014-08-28 23:20:54 -0400
commitbc3f6e767dcd2dc46fb95d4bf99b759668e0ff7d (patch)
treeed43e8595edded5d6bc28c756edbce23470e9257 /lisp/init-buffile.el
parent18eec2656aa8a78b5a4ac9aaca8722c9981eedf4 (diff)
downloademacs.d-bc3f6e767dcd2dc46fb95d4bf99b759668e0ff7d.tar.gz
Add file-map prefix command
This prefix will be used for find-file functions that don't already have a shorter keybinding. This commit adds two functions to the map, `view-file' and `magit-find-file', which both have an other-window analog in `ctl-x-4-map'. View mode can be accessed using ',v' right after finding a file, so the `view-file' binding might not be too useful. `magit-find-file' was in my magit-specific map, but it makes sense to have it here because it's useful in buffers outside the magit status buffer.
Diffstat (limited to 'lisp/init-buffile.el')
-rw-r--r--lisp/init-buffile.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/lisp/init-buffile.el b/lisp/init-buffile.el
index 98eb16f..5e6aee8 100644
--- a/lisp/init-buffile.el
+++ b/lisp/init-buffile.el
@@ -70,6 +70,11 @@ user."
(save-buffer)
(server-edit)))
+(define-prefix-command 'km/file-map)
+(global-set-key (kbd "C-c f") 'km/file-map)
+
+(define-key km/file-map "v" 'view-file)
+
;;; Ibuffer
;; Replace buffer-menu with ibuffer.