about summary refs log tree commit diff
path: root/users
diff options
context:
space:
mode:
Diffstat (limited to 'users')
-rw-r--r--users/sterni/emacs/init.el10
1 files changed, 9 insertions, 1 deletions
diff --git a/users/sterni/emacs/init.el b/users/sterni/emacs/init.el
index 97c722431b77..ef5b929b86a9 100644
--- a/users/sterni/emacs/init.el
+++ b/users/sterni/emacs/init.el
@@ -121,11 +121,19 @@
 
 ;; projects (see also evil config)
 
+(defun project-magit ()
+  "Run magit in the current project dir"
+  (interactive)
+  (magit (project-root (project-current t))))
+
+(define-key project-prefix-map (kbd "G") 'project-magit)
+
 (setq project-switch-commands
       '((project-find-file "Find file")
         (project-find-regexp "Find regexp")
         (project-dired "Dired")
-        (project-shell "Shell")))
+        (project-shell "Shell")
+        (project-magit "Magit")))
 
 ;;; Configure packages
 (require 'use-package)