From bc3f6e767dcd2dc46fb95d4bf99b759668e0ff7d Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Thu, 28 Aug 2014 23:20:54 -0400 Subject: 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. --- lisp/init-buffile.el | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lisp/init-buffile.el') 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. -- cgit v1.2.3