summaryrefslogtreecommitdiff
path: root/init/km-projectile.el
blob: 46a80ed2e3454740f0dc41c6cda043b2f42a5bfa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
(projectile-global-mode)

(setq projectile-switch-project-action 'km/projectile-magit-status)

(defun km/projectile-magit-status ()
  (magit-status (projectile-project-root)))

(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-find-file'"
  (interactive)
  (let ((projectile-switch-project-action 'projectile-find-file))
    (projectile-switch-project)))

(define-key projectile-mode-map (kbd "C-c p j")
  'km/projectile-switch-project-to-file)