From c48e7fda4c7a13af4b29d73f365f0bb7cd2c056e Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Tue, 3 Dec 2013 21:36:30 -0500 Subject: 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. --- init/km-projectile.el | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'init') 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) -- cgit v1.2.3