summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2013-12-09 12:08:03 -0500
committerKyle Meyer <kyle@kyleam.com>2013-12-09 12:08:03 -0500
commit7a85498565f8cbe2b13a9ea503fc62eccfd5be14 (patch)
tree4ed6032f43f34e10784b6b7b8165dbb9739bf035 /init
parentea7f64a0bcfab0db4c7c33dd94f5cc0ae2741c4f (diff)
downloademacs.d-7a85498565f8cbe2b13a9ea503fc62eccfd5be14.tar.gz
Update projectile for new commander
projectile 0.10 has a new commander function. Set default switch project action to commander (instead of magit status) and add magit status as command option. If I find I tend to use one option most of the time, I may set that as the switch project action and return commander to only being used when a prefix arg is given.
Diffstat (limited to 'init')
-rw-r--r--init/km-projectile.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/init/km-projectile.el b/init/km-projectile.el
index 46a80ed..f5226e1 100644
--- a/init/km-projectile.el
+++ b/init/km-projectile.el
@@ -1,15 +1,19 @@
(projectile-global-mode)
-(setq projectile-switch-project-action 'km/projectile-magit-status)
+(setq projectile-switch-project-action 'projectile-commander)
(defun km/projectile-magit-status ()
(magit-status (projectile-project-root)))
+(def-projectile-commander-method ?v
+ "Open magit status for project."
+ (km/projectile-magit-status))
+
(defun km/projectile-switch-project-to-file ()
"Provide access to the of default `projectile-find-file'.
I have set `projectile-switch-project-action' to
-`km/projectile-magit-status' but would still like quick access to
+`projectile-commander' but would still like quick access to
`projectile-find-file'"
(interactive)
(let ((projectile-switch-project-action 'projectile-find-file))