projects
/
dotfiles.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
6368c2a
)
emacs - window buffer, jump to dired or project root
author
Peng Li
<seudut@gmail.com>
Sat, 30 Jul 2016 19:33:20 +0000
(
03:33
+0800)
committer
Peng Li
<seudut@gmail.com>
Sat, 30 Jul 2016 19:33:20 +0000
(
03:33
+0800)
emacs.d/config.org
patch
|
blob
|
history
diff --git
a/emacs.d/config.org
b/emacs.d/config.org
index
d3c5db5
..
d6ae9a5
100644
(file)
--- a/
emacs.d/config.org
+++ b/
emacs.d/config.org
@@
-2264,7
+2264,7
@@
Most use =C-o C-o= to switch buffers; =C-o x, v= to split window; =C-o o= to del
;; ibuffer, dired, eshell, bookmarks
;; ("d" ace-delete-window "ace-one" :exit t)
("C-o" ido-switch-buffer nil :exit t)
;; ibuffer, dired, eshell, bookmarks
;; ("d" ace-delete-window "ace-one" :exit t)
("C-o" ido-switch-buffer nil :exit t)
- ("d"
projectile-dired
nil :exit t)
+ ("d"
sd/project-or-dired-jump
nil :exit t)
("b" ibuffer nil n:exit t)
("e" eshell nil :exit t)
("m" bookmark-jump-other-window nil :exit t)
("b" ibuffer nil n:exit t)
("e" eshell nil :exit t)
("m" bookmark-jump-other-window nil :exit t)
@@
-2287,6
+2287,14
@@
Most use =C-o C-o= to switch buffers; =C-o x, v= to split window; =C-o o= to del
(global-unset-key (kbd "C-o"))
(global-set-key (kbd "C-o") 'sd/hydra-window/body)
(global-unset-key (kbd "C-o"))
(global-set-key (kbd "C-o") 'sd/hydra-window/body)
+
+ (defun sd/project-or-dired-jump ()
+ "If under project, jump to the root directory, otherwise
+ jump to dired of current file"
+ (interactive)
+ (if (projectile-project-p)
+ (projectile-dired)
+ (dired-jump)))
#+END_SRC
** Motion
#+END_SRC
** Motion