From 7f7ede201b1eb1a9ac7811b716bf39a5adae9896 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Thu, 28 Apr 2022 15:49:22 -0500 Subject: Dim .gitignore files (mostly) in dired --- lisp/+dired.el | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lisp') diff --git a/lisp/+dired.el b/lisp/+dired.el index 131d326..9a2e01a 100644 --- a/lisp/+dired.el +++ b/lisp/+dired.el @@ -15,5 +15,15 @@ (push-mark))) (dired-goto-file file)) +;;; [[https://www.reddit.com/r/emacs/comments/u2lf9t/weekly_tips_tricks_c_thread/i4n9aoa/?context=3][Dim files in .gitignore]] + +(defun +dired-dim-git-ignores () + "Dim out .gitignore contents" + (require 'vc) + (when-let ((ignores (vc-default-ignore-completion-table 'git ".gitignore")) + (exts (make-local-variable 'completion-ignored-extensions))) + (dolist (item ignores) + (add-to-list exts item)))) + (provide '+dired) ;;; +dired.el ends here -- cgit 1.4.1-21-gabe81