From effceb6b42cba182b64eba28ca15a2ed379c7888 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Fri, 8 Jan 2021 23:32:20 -0600 Subject: Customize dired --- config.org | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/config.org b/config.org index 0b88d0f..c0c3027 100644 --- a/config.org +++ b/config.org @@ -1304,6 +1304,12 @@ This has to be done /before/ loading the package. It's included in =visual-fill #+BEGIN_SRC emacs-lisp ;; highlight the current line in dired. (add-hook 'dired-mode-hook #'hl-line-mode) + + (cuss dired-recursive-copies 'always + "Always recursively copy.") + + (cuss dired-listing-switches "-alh" + "Show All items, Listed out, with Human-readable sizes.") #+end_src *** Expand subtrees @@ -1324,6 +1330,20 @@ This has to be done /before/ loading the package. It's included in =visual-fill (add-hook 'dired-mode-hook #'dired-collapse-mode) #+end_src +*** Kill dired buffers + +from [[https://github.com/munen/emacs.d/][munen]]. + +#+BEGIN_SRC emacs-lisp + (defun kill-dired-buffers () + "Kill all open dired buffers." + (interactive) + (mapc (lambda (buffer) + (when (eq 'dired-mode (buffer-local-value 'major-mode buffer)) + (kill-buffer buffer))) + (buffer-list))) +#+end_src + ** Org mode I’ve put org mode under Applications, as opposed to Writing, because it’s more generally-applicable than that. -- cgit 1.4.1-21-gabe81