mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
remove unnecessary dotfile functions and hooks
This commit is contained in:
@ -14,18 +14,3 @@
|
|||||||
(not (file-remote-p default-directory))
|
(not (file-remote-p default-directory))
|
||||||
(locate-dominating-file "." ".git"))
|
(locate-dominating-file "." ".git"))
|
||||||
(dired-git-info-mode 1)))
|
(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)))))
|
|
||||||
|
@ -47,8 +47,6 @@ only variant that supports --group-directories-first."
|
|||||||
|
|
||||||
;; hide details by default
|
;; hide details by default
|
||||||
(add-hook 'dired-mode-hook 'dired-hide-details-mode)
|
(add-hook 'dired-mode-hook 'dired-hide-details-mode)
|
||||||
;; hide dotfiles by default
|
|
||||||
(add-hook 'dired-after-readin-hook '+dired-dotfiles-hide)
|
|
||||||
|
|
||||||
;; Don't complain about this command being disabled when we use it
|
;; Don't complain about this command being disabled when we use it
|
||||||
(put 'dired-find-alternate-file 'disabled nil)
|
(put 'dired-find-alternate-file 'disabled nil)
|
||||||
|
Reference in New Issue
Block a user