summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2013-12-03 21:36:30 -0500
committerKyle Meyer <kyle@kyleam.com>2013-12-03 21:36:30 -0500
commitc48e7fda4c7a13af4b29d73f365f0bb7cd2c056e (patch)
tree196037473ab8763b62923c68e639eadb5b62ff0d /init
parent9f9f6bb4151b40ca0fba1d9710f6a8f934532b9c (diff)
downloademacs.d-c48e7fda4c7a13af4b29d73f365f0bb7cd2c056e.tar.gz
Function for default projectile switch project
I've set the project switch action to show the magit status, but this function makes the default find file behavior available.
Diffstat (limited to 'init')
-rw-r--r--init/km-projectile.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/init/km-projectile.el b/init/km-projectile.el
index 6f5da20..a5f3b3e 100644
--- a/init/km-projectile.el
+++ b/init/km-projectile.el
@@ -4,3 +4,13 @@
(defun km/projectile-magit-status ()
(magit-status (projectile-project-root)))
+
+(defun km/projectile-switch-project-to-file ()
+ "I have set `projectile-switch-project-action' to
+ `km/projectile-magit-status'. This function gives access to the
+ of default `projectile-find-file'"
+ (interactive)
+ (let ((projectile-switch-project-action 'projectile-find-file))
+ (projectile-switch-project)))
+
+(global-set-key (kbd "C-c p j") 'km/projectile-switch-project-to-file)