summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2015-02-01 19:10:03 -0500
committerKyle Meyer <kyle@kyleam.com>2015-02-02 22:47:08 -0500
commitb91d5edb04a6649de785a628863bf730bb9df0fb (patch)
treeb194773207c2c53050bf12119fcb8f57cb8ca0ba /lisp
parent3993e88764bfe3415b0a7bff83a5ba630cf9cfe1 (diff)
downloademacs.d-b91d5edb04a6649de785a628863bf730bb9df0fb.tar.gz
Rework some Projectile bindings
Diffstat (limited to 'lisp')
-rw-r--r--lisp/init-projectile.el26
1 files changed, 17 insertions, 9 deletions
diff --git a/lisp/init-projectile.el b/lisp/init-projectile.el
index 6024ff1..cb13af1 100644
--- a/lisp/init-projectile.el
+++ b/lisp/init-projectile.el
@@ -54,11 +54,18 @@ Interactive arguments are processed according to
(define-key projectile-command-map "."
'km/projectile-copy-project-filename-as-kill)
+;; This overrides `projectile-find-file-dwim'.
+(define-key projectile-command-map "g" 'projectile-vc)
;; Swap `projectile-invalidate-cache' and `projectile-ibuffer'.
(define-key projectile-command-map "I" 'projectile-invalidate-cache)
(define-key projectile-command-map "i" 'projectile-ibuffer)
-(define-key projectile-command-map "j"
- 'km/projectile-switch-project-to-file)
+(define-key projectile-command-map "q" 'projectile-replace)
+;; This overrides `projectile-replace', which is now on 'q'.
+(define-key projectile-command-map "r" 'projectile-recentf)
+;; This overrides Projectile's general search prefix.
+(define-key projectile-command-map "s" 'projectile-grep)
+;; This overrides `projectile-vc', which is now on 'g'.
+(define-key projectile-command-map "v" 'km/projectile-view-file)
(key-chord-define-global "jq" 'projectile-commander)
(key-chord-define-global "gp" 'projectile-switch-project)
@@ -98,25 +105,26 @@ Interactive arguments are processed according to
"Find project file in other window."
(call-interactively 'projectile-find-file-other-window))
+(def-projectile-commander-method ?g
+ "Open project root in vc-dir or magit."
+ (projectile-vc))
+
(def-projectile-commander-method ?i
"Open an IBuffer window showing all buffers in the current project."
(call-interactively 'projectile-ibuffer))
-;; Default binding is v.
-(def-projectile-commander-method ?m
- "Open project root in vc-dir or magit."
- (projectile-vc))
-
(def-projectile-commander-method ?O
"Display a project buffer in other window."
(call-interactively 'projectile-display-buffer))
-;; Default binding is e.
(def-projectile-commander-method ?r
"Find recently visited file in project."
(projectile-recentf))
-;; Default binding is D.
+(def-projectile-commander-method ?s
+ "Run grep on project."
+ (call-interactively #'projectile-grep))
+
(def-projectile-commander-method ?t
"Open project root in dired."
(projectile-dired))