summary refs log tree commit diff stats
path: root/tag-emacs/emacs.d/init.el
diff options
context:
space:
mode:
authorAlan Pearce2014-07-06 11:54:24 +0100
committerAlan Pearce2014-07-06 11:54:24 +0100
commit046dfb9cf1e1690487d20091ae4545f158141fa6 (patch)
tree0e15a91801c2341ed3dbc854a739179144873d68 /tag-emacs/emacs.d/init.el
parent915d006a6711e4576c687a0f01832a8ac64838e5 (diff)
downloadnixfiles-046dfb9cf1e1690487d20091ae4545f158141fa6.tar.lz
nixfiles-046dfb9cf1e1690487d20091ae4545f158141fa6.tar.zst
nixfiles-046dfb9cf1e1690487d20091ae4545f158141fa6.zip
Emacs: install and configure dired-subtree
Diffstat (limited to 'tag-emacs/emacs.d/init.el')
-rw-r--r--tag-emacs/emacs.d/init.el16
1 files changed, 16 insertions, 0 deletions
diff --git a/tag-emacs/emacs.d/init.el b/tag-emacs/emacs.d/init.el
index 66a4c06f..6b13290a 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