29

Show/hide Emacs dired details in style

 4 years ago
source link: http://xenodium.com/showhide-emacs-dired-details-in-style/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Álvaro Ramírez

05 October 2019 Show/hide Emacs dired details in style

Emacs dired is a powerful directory browser/editor. By default, it shows lots of handy file and directory details.

dired.png

I typically prefer hiding file and directory details until I need them. The built-in dired-hide-details-mode makes this easy with the "(" key toggle. Coupled with Steve Purcell's diredfl (for coloring), it strikes a great user experience.

diredfl.gif

With a short snippet, you can also show/hide dired details in style:

(use-package dired
  :hook (dired-mode . dired-hide-details-mode)
  :config
  ;; Colourful columns.
  (use-package diredfl
    :ensure t
    :config
    (diredfl-global-mode 1)))

UPDATE: Thanks to Daniel Martín, who pointed me to dired-git-info. This package adds git logs to dired file and directory details.

dired-git-info.gif

Binding dired-git-info-mode to ")" is a nice complement to dired-hide-details-mode's "(" binding.

(use-package dired-git-info
    :ensure t
    :bind (:map dired-mode-map
                (")" . dired-git-info-mode)))

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK