mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
[dired] add support for hiding dotfiles and hide details by default
This commit is contained in:
@ -6,7 +6,24 @@
|
||||
(interactive)
|
||||
(mapc #'kill-buffer (doom-buffers-in-mode 'dired-mode))
|
||||
(message "Killed all dired buffers"))
|
||||
|
||||
|
||||
;;;###autoload
|
||||
(defun +dired/enable-git-info-h ()
|
||||
(if (locate-dominating-file "." ".git")
|
||||
(dired-git-info-mode 1)))
|
||||
|
||||
;;;###autoload
|
||||
(defun +dired/dotfiles-hide ()
|
||||
(set (make-local-variable '+dired-dotfiles-show-p) nil)
|
||||
(dired-mark-files-regexp "^\\\.")
|
||||
(dired-do-kill-lines))
|
||||
|
||||
;;;###autoload
|
||||
(defun +dired/dotfiles-toggle ()
|
||||
(interactive)
|
||||
(when (equal major-mode 'dired-mode)
|
||||
(if (or (not (boundp '+dired-dotfiles-show-p)) +dired-dotfiles-show-p) ; if currently showing
|
||||
(+dired/dotfiles-hide)
|
||||
(progn (revert-buffer) ; otherwise just revert to re-show
|
||||
(set (make-local-variable '+dired-dotfiles-show-p) t)))))
|
||||
|
Reference in New Issue
Block a user