diff options
author | Kyle Meyer <kyle@kyleam.com> | 2015-02-20 23:54:04 -0500 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2015-02-28 00:29:49 -0500 |
commit | aef57f4f9c14ec592cd20871ab8c7f297c15af67 (patch) | |
tree | b2086c76b1c5c7511f3a4b058ee2cfbd410d0506 /lisp | |
parent | 770f3d61ce3f835a9c2c1062160905982a94d6dd (diff) | |
download | emacs.d-aef57f4f9c14ec592cd20871ab8c7f297c15af67.tar.gz |
Delete saved thing when killing project buffers
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/init-projectile.el | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lisp/init-projectile.el b/lisp/init-projectile.el index 220b5be..e099ec1 100644 --- a/lisp/init-projectile.el +++ b/lisp/init-projectile.el @@ -121,6 +121,14 @@ If there is nothing ot restore, call (or (km/projectile-restore-thing) (funcall km/projectile-switch-fallback))) +(defun km/projectile-kill-buffers () + "Kill all project buffers. +Before running `projectile-kill-buffers', delete any saved thing +for the project." + (interactive) + (km/projectile-save-thing ?d) + (projectile-kill-buffers)) + (define-key projectile-command-map (kbd "4 v") 'km/projectile-view-file-other-window) @@ -132,6 +140,7 @@ If there is nothing ot restore, call ;; Swap `projectile-invalidate-cache' and `projectile-ibuffer'. (define-key projectile-command-map "I" 'projectile-invalidate-cache) (define-key projectile-command-map "i" 'projectile-ibuffer) +(define-key projectile-command-map "k" 'km/projectile-kill-buffers) (define-key projectile-command-map "q" 'projectile-replace) ;; This overrides `projectile-replace', which is now on 'q'. (define-key projectile-command-map "r" 'projectile-recentf) @@ -191,6 +200,10 @@ If there is nothing ot restore, call "Open an IBuffer window showing all buffers in the current project." (call-interactively 'projectile-ibuffer)) +(def-projectile-commander-method ?k + "Kill all project buffers." + (call-interactively 'km/projectile-kill-buffers)) + (def-projectile-commander-method ?O "Display a project buffer in other window." (call-interactively 'projectile-display-buffer)) |