From 3a23393346d0b27548294031b19148857794e4e2 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Thu, 11 Mar 2021 12:15:33 -0600 Subject: Configure `dired' and add packages --- init.el | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'init.el') diff --git a/init.el b/init.el index 1508a8d..23628d7 100644 --- a/init.el +++ b/init.el @@ -320,6 +320,31 @@ (acdw/hooks text-mode-hook goto-address-mode) (acdw/hooks prog-mode-hook goto-address-prog-mode) +;;; Dired + +(acdw/set `((dired-recursive-copies always) + (dired-recursive-deletes always) + (delete-by-moving-to-trash t) + (dired-listing-switches "-Al") + (ls-lisp-dirs-first t) + (dired-dwim-target t))) + +(defun hook--dired-mode () + (hl-line-mode +1) + (dired-hide-details-mode +1)) +(add-hook 'dired-mode-hook #'hook--dired-mode) + +(acdw/bind "C-x C-j" dired-jump :after "dired-x") + +(with-eval-after-load 'dired + ;; I tried `autoload'ing the keymap, and it just wouldn't work. I have no + ;; idea what the issue was. + (acdw/pkg dired-subtree + :binds (("i" dired-subtree-toggle :map dired-mode-map)))) + +(acdw/pkg dired-collapse + :hooks (dired-mode-hook dired-collapse-mode)) + ;;; Miscellaneous (acdw/set '((disabled-command-function nil) -- cgit 1.4.1-21-gabe81