summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2014-08-19 01:14:43 -0400
committerKyle Meyer <kyle@kyleam.com>2014-08-19 01:14:43 -0400
commit00b804ab9b710ea58647ecc60f44d81b62c342c8 (patch)
treee33f69c6ac8dada83fd259c6c532b4130e05cbdb /lisp
parent8f92419cc9c07193385ad673f9f70de24c2b747d (diff)
downloademacs.d-00b804ab9b710ea58647ecc60f44d81b62c342c8.tar.gz
lisp/init-projectile.el: Reorder bindings
Diffstat (limited to 'lisp')
-rw-r--r--lisp/init-projectile.el56
1 files changed, 28 insertions, 28 deletions
diff --git a/lisp/init-projectile.el b/lisp/init-projectile.el
index ec311e6..c70240e 100644
--- a/lisp/init-projectile.el
+++ b/lisp/init-projectile.el
@@ -6,31 +6,6 @@
projectile-find-dir-includes-top-level t
projectile-use-git-grep t)
-;; Default binding is D.
-(def-projectile-commander-method ?r
- "Open project root in dired."
- (projectile-dired))
-
-(def-projectile-commander-method ?c
- "Run project compilation command."
- (call-interactively 'projectile-compile-project))
-
-(def-projectile-commander-method ?F
- "Find project file in other window."
- (call-interactively 'projectile-find-file-other-window))
-
-(def-projectile-commander-method ?B
- "Find project buffer in other window."
- (call-interactively 'projectile-switch-to-buffer-other-window))
-
-(def-projectile-commander-method ?D
- "Find a project directory in other window."
- (call-interactively 'projectile-find-dir-other-window))
-
-(def-projectile-commander-method ?O
- "Display a project buffer in other window."
- (call-interactively 'projectile-display-buffer))
-
(defun km/projectile-switch-project-to-file ()
"Provide access to the of default `projectile-find-file'.
@@ -47,9 +22,6 @@ I have set `projectile-switch-project-action' to
(let ((default-directory (projectile-project-root)))
(km/open-external-terminal)))
-(define-key projectile-mode-map (kbd "C-c p j")
- 'km/projectile-switch-project-to-file)
-
(defun km/dired-copy-project-filename-as-kill ()
"Copy names of marked project files into kill ring.
This is similar to `dired-copy-filename-as-kill', but the leading
@@ -69,6 +41,31 @@ path is always relative to `projectile-project-root'."
(after 'dired
(define-key dired-mode-map "W" 'km/dired-copy-project-filename-as-kill))
+;; Default binding is D.
+(def-projectile-commander-method ?r
+ "Open project root in dired."
+ (projectile-dired))
+
+(def-projectile-commander-method ?D
+ "Find a project directory in other window."
+ (call-interactively 'projectile-find-dir-other-window))
+
+(def-projectile-commander-method ?c
+ "Run project compilation command."
+ (call-interactively 'projectile-compile-project))
+
+(def-projectile-commander-method ?F
+ "Find project file in other window."
+ (call-interactively 'projectile-find-file-other-window))
+
+(def-projectile-commander-method ?B
+ "Find project buffer in other window."
+ (call-interactively 'projectile-switch-to-buffer-other-window))
+
+(def-projectile-commander-method ?O
+ "Display a project buffer in other window."
+ (call-interactively 'projectile-display-buffer))
+
(key-chord-define-global ";s" 'projectile-switch-project)
(key-chord-define-global ";f" 'projectile-find-file)
(key-chord-define-global ";d" 'projectile-find-dir)
@@ -78,6 +75,9 @@ path is always relative to `projectile-project-root'."
(key-chord-define-global ";r" 'projectile-recentf)
(key-chord-define-global ";c" 'projectile-commander)
+(define-key projectile-mode-map (kbd "C-c p j")
+ 'km/projectile-switch-project-to-file)
+
(define-prefix-command 'projectile-ctl-x-4-map)
(define-key ctl-x-4-map "p" 'projectile-ctl-x-4-map)