Dired tweaks

This commit is contained in:
Ian Keane 2026-08-06 16:21:26 -04:00
parent a7676e49ec
commit fd97cd17cf

View file

@ -262,6 +262,8 @@ Setting this in the :init of evil doesn't work for some reason. It has to be ear
** Behavioral Tweaks
#+begin_src emacs-lisp
(setq ring-bell-function 'ignore)
(when IS-MACOS
(setq mac-pass-command-to-system nil))
@ -451,27 +453,30 @@ Setting this in the :init of evil doesn't work for some reason. It has to be ear
#+end_src
** Dired
#+begin_src emacs-lisp
(setq ring-bell-function 'ignore)
(setq dired-listing-switches "-al")
(setq dired-listing-switches "-alh --group-directories-first")
;; opening 'other window' on a subdir enters 2 window dired mode for copy/paste
(setq dired-dwim-target t)
;; ;; if dired's already loaded, then the keymap will be bound
;; (if (boundp 'dired-mode-map)
;; (my-dired-init)
;; (add-hook 'dired-load-hook 'my-dired-init))
;; refresh dired buffers automatically after file operations
(setq dired-auto-revert-buffer t)
(add-hook 'dired-mode-hook 'dired-hide-details-mode)
(use-package dired-open
:config
(setq dired-open-extensions '(("png" . "nsxiv")
("mkv" . "mpv")
("avi" . "mpv"))))
;; (eval-after-load 'evil
;; '(evil-define-key 'normal dired-mode-map (kbd "SPC") nil))
(use-package all-the-icons-dired
:hook (dired-mode . all-the-icons-dired-mode))
(use-package nerd-icons-dired
:hook (dired-mode . nerd-icons-dired-mode))
;; Reuse dired buffer when navigating directories
(put 'dired-find-alternate-file 'disabled nil)
(with-eval-after-load 'dired
(evil-collection-define-key 'normal 'dired-mode-map
(kbd "RET") 'dired-find-alternate-file
(kbd "^") 'dired-up-directory))
#+end_src
** Treemacs
@ -539,7 +544,7 @@ I know these could be bound on a per-package basis, but since this is my primary
":" '(execute-extended-command :which-key "M-x")
";" '(eval-expression :which-key "Eval")
"<" '(consult-buffer :which-key "Buffers (all)")
"-" '(dired :which-key "Find Directory")
"-" '(dired-jump :which-key "Find Directory")
"d" '(docker :which-key "Docker")
"i" '(ian/conditional-imenu :which-key "Imenu")
"w" '(ace-window :which-key "Window")