diff options
author | Kyle Meyer <kyle@kyleam.com> | 2014-08-28 23:20:54 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2014-08-28 23:20:54 -0400 |
commit | bc3f6e767dcd2dc46fb95d4bf99b759668e0ff7d (patch) | |
tree | ed43e8595edded5d6bc28c756edbce23470e9257 /lisp | |
parent | 18eec2656aa8a78b5a4ac9aaca8722c9981eedf4 (diff) | |
download | emacs.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')
-rw-r--r-- | lisp/init-buffile.el | 5 | ||||
-rw-r--r-- | lisp/init-git.el | 5 |
2 files changed, 6 insertions, 4 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. diff --git a/lisp/init-git.el b/lisp/init-git.el index 7148b19..f4fa2bf 100644 --- a/lisp/init-git.el +++ b/lisp/init-git.el @@ -82,9 +82,6 @@ Useful for non-source code repos (e.g., Org mode note files)." (delete "--track" magit-branch-popup-defaults))) (define-key ctl-x-4-map "g" 'magit-find-file-other-window) - -(define-prefix-command 'km/magit-prefix-map) -(define-key km/magit-prefix-map "f" 'magit-find-file) - +(define-key km/file-map "g" 'magit-find-file) (provide 'init-git) |