summary refs log tree commit diff stats
path: root/tag-emacs/emacs.d
diff options
context:
space:
mode:
Diffstat (limited to 'tag-emacs/emacs.d')
-rw-r--r--tag-emacs/emacs.d/Cask1
-rw-r--r--tag-emacs/emacs.d/init.el16
2 files changed, 17 insertions, 0 deletions
diff --git a/tag-emacs/emacs.d/Cask b/tag-emacs/emacs.d/Cask
index 880449a..78b286c 100644
--- a/tag-emacs/emacs.d/Cask
+++ b/tag-emacs/emacs.d/Cask
@@ -19,6 +19,7 @@
 (depends-on "diff-hl")
 (depends-on "diminish")
 (depends-on "dired+")
+(depends-on "dired-subtree")
 (depends-on "discover")
 (depends-on "discover-my-major")
 (depends-on "elisp-slime-nav")
diff --git a/tag-emacs/emacs.d/init.el b/tag-emacs/emacs.d/init.el
index 66a4c06..6b13290 100644
--- a/tag-emacs/emacs.d/init.el
+++ b/tag-emacs/emacs.d/init.el
@@ -260,6 +260,22 @@
             (setq dired-omit-files "#\\|\\.$"
                   dired-find-subdir t)))
 
+(req-package dired-subtree
+  :defer t
+  :config (progn
+            (setq dired-subtree-use-backgrounds nil)
+            (defun dired-subtree-maybe-up ()
+              "Jump up one subtree or directory"
+              (interactive)
+              (let ((ov (dired-subtree--get-ov)))
+                (if ov
+                    (progn (goto-char (overlay-start ov))
+                           (dired-previous-line 1))
+                  (dired-up-directory))))
+            (bind-key "^" #'dired-subtree-maybe-up dired-mode-map))
+  :init (progn
+          (bind-key "i" #'dired-subtree-insert dired-mode-map)))
+
 ;;;; Documentation
 
 (req-package which-func