Dired Delight lets you tag files in Dired, Emacs’ file manager, with colors.
This affords a visual way – besides the filesystem tree – to group files, or persistently mark files needing action, find a specific file at a glance, etc… I think? (Honestly I’m not sure.)
- There are two supported styles for marking:
A block next to the file name (left), or highlighting (right). Both styles work with and without dired-hide-details-mode
.
- Select colors with preview for marking:
- Works fine with Dirvish
Clone this repo or download its files and run M-x package-install-file
on the directory.
(use-package dired-delight
:straight (:host github :repo "karthink/dired-delight")
:hook (dired-mode . dired-delight-mode)
:bind (:map dired-mode-map
("@" . dired-delight)
("*c" . dired-delight-mark-color)))
(package-install 'quelpa-use-package)
(require 'quelpa-use-package)
(use-package dired-delight
:quelpa (dired-delight :fetcher github :repo "karthink/dired-delight")
:hook (dired-mode . dired-delight-mode)
:bind (:map dired-mode-map
("@" . dired-delight)
("*c" . dired-delight-mark-color)))
- Turn on
dired-delight-mode
in a Dired buffer. - Mark files (or not for a single file) and call
dired-delight
to tag marked files. To remove a tag don’t supply any color, i.e. leave it blank. - Call
dired-delight-mark-color
to mark all files that have a given color. You can then narrow the buffer to these files, or act on them in any of the usual ways.
The following keybindings may help:
(define-key dired-mode-map (kbd "@") 'dired-delight)
(define-key dired-mode-map (kbd "*c") 'dired-delight-mark-color)
Option | Description | Default |
---|---|---|
dired-delight-display | Set color display style (block or background) | Block |
dired-delight-use-relative-names | Match files by relative names, not absolute paths. | Absolute paths |
dired-delight-file | File used to persist Delight data across sessions | XDG_CACHE_DIR or user-emacs-directory |