diff options
author | Tom Willemse | 2019-07-24 07:56:15 -0700 |
---|---|---|
committer | Tom Willemse | 2019-07-24 07:56:15 -0700 |
commit | bd5985f0aa3564a602d5355bd2fbe5da56e4f41b (patch) | |
tree | d204a78cf6371cd23dba255b9e64ca2359c1519d | |
parent | e1ff5ceda59a2a524ce76b6e7473c013f2e11316 (diff) | |
download | emacs-config-bd5985f0aa3564a602d5355bd2fbe5da56e4f41b.tar.gz emacs-config-bd5985f0aa3564a602d5355bd2fbe5da56e4f41b.zip |
Add extra action to projectile-switch-project
I’ve noticed that a lot of the time I want to go directly to a project’s git
status, instead of to one of the files. Now I can press ‘M-o’ when switching
projects with Ivy and I’ll get a choice of switching to the magit buffer.
-rw-r--r-- | oni-projectile.el | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/oni-projectile.el b/oni-projectile.el index d14b32f..d406688 100644 --- a/oni-projectile.el +++ b/oni-projectile.el @@ -4,7 +4,7 @@ ;; Author: Tom Willemse <tom@ryuslash.org> ;; Keywords: local -;; Version: 20190228220938 +;; Version: 20190724075557 ;; Package-Requires: (projectile ivy oni-data-dir) ;; This program is free software; you can redistribute it and/or modify @@ -26,6 +26,7 @@ ;;; Code: +(require 'ivy) (require 'oni-data-dir) (require 'projectile) @@ -43,6 +44,10 @@ (define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map) +(ivy-set-actions + 'projectile-switch-project + '(("g" magit-status "git status"))) + (when (eq system-type 'windows-nt) (setq projectile-enable-caching nil) (setq projectile-generic-command "\"C:\\Program Files\\Git\\usr\\bin\\find.exe\" . -type d \"(\" -path \"*/node_modules\" -o -path \"*/upload-test\" -o -path \"*/dlls\" -o -path \"*/apps/*/img\" -o -path \"*/apps/*/video\" -o -path \"*/apps/*/font\" -o -path \"*/apps/*/content\" -o -path \"*/apps/*/favicons\" -o -path \"*/apps/*/pages.*\" -o -path \"*/.intl\" \")\" -prune -o -type f -print0") |