projects
/
dotfiles.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d4342dc
)
emacs - add a function conbining helm-mini and helm-projectile-switch-buffers
author
Peng Li
<seudut@gmail.com>
Tue, 22 Sep 2015 14:03:32 +0000
(22:03 +0800)
committer
Peng Li
<seudut@gmail.com>
Tue, 22 Sep 2015 14:03:32 +0000
(22:03 +0800)
emacs.d/config/init-key-binding.el
patch
|
blob
|
history
diff --git
a/emacs.d/config/init-key-binding.el
b/emacs.d/config/init-key-binding.el
index
6b303fc
..
46aec50
100644
(file)
--- a/
emacs.d/config/init-key-binding.el
+++ b/
emacs.d/config/init-key-binding.el
@@
-25,7
+25,7
@@
;; Esc s or M-s as prefix key
(pl-make-keymap "\M-s"
;; Esc s or M-s as prefix key
(pl-make-keymap "\M-s"
- '(("j" .
helm-projectile-switch-to-buffer
)
+ '(("j" .
pl-switch-buffers
)
("h" . persp-switch)
("k" . helm-cmd-t)
("w" . save-buffer)
("h" . persp-switch)
("k" . helm-cmd-t)
("w" . save-buffer)
@@
-35,6
+35,14
@@
("o" . occur)
("b" . helm-find-files)))
("o" . occur)
("b" . helm-find-files)))
+;; if current is not a project, useing helm-mini instead
+(defun pl-switch-buffers ()
+ (interactive)
+ (if (projectile-project-p)
+ (helm-projectile-switch-to-buffer)
+ (helm-mini)))
+
+
;(setq key-chord-two-keys-delay 0.2)
;; from emacs conference 2015 workshop
(defun keychord-keymap (keychord bindings)
;(setq key-chord-two-keys-delay 0.2)
;; from emacs conference 2015 workshop
(defun keychord-keymap (keychord bindings)