reddit / emacs

Emacs Dired extras by Prot ?

baby_vip · 2022-07-21 13:07
arthurno1 · 2022-07-21 16:31
As an alternative to do stuff manually as Prot does, you can also take a look at [dired-hacks by Goljer](https://github.com/Fuco1/dired-hacks), a.k.a Fuco, in particular dired-subtree and dired-filter. Dired-subtree let's you "toggle" directory listings displayed inline, similar as how other file managers expand/collapse directories in "list-mode". If you prefer using Dired interactively, that one is a game changer in my opinion. I have 'dired-subtree-toggle' on a tab key, so I can just quickly press tab to "expand/collapse" a folder. it is not same as pressing 'i' in Dired and having content of a directory inserted "below", but in my opinion, I never find the built-in Dired version very appealing. Subtree-toggle also skips extra headers for inserted directories, and I can still do all dired operations on directories as if they were inserted with built-in method that Prot demonstrates. [I have also used dired-subtree-toggle to make three small functions on top of it to expand entire directory tree one folder at a time, all at once and to collapse them](https://github.com/amno1/.emacs.d/blob/main/lisp/dired-extras.el). For filtering out files, you can surely do as he does mark files by expression and manually narrow/widden, but dired-hacks comes with a nice filter functionality, which Fuco calls "dired-narrow". I have it on C-S-f, so I can sort of press a shortcut and just type letters and see my dired buffer filtered out from anything that does not match text I type, similar as completing read or Helm. I think it is also quite game changing. There are other useful tools there as well, but those two are for me really handy.
w0ntfix · 2022-07-21 19:49
see also: https://github.com/alexluigit/dirvish
emacs_expert · 2022-07-22 08:12
I guess I'm weird but I've been pretty happy with a mostly vanilla dired. It's already simple, fast, and powerful. I do use `dired-x`, which I think is built-in. The ability to omit certain entries like `.`, `..`, and `.DS_Store` (a Mac annoyance) is really nice. I'll have to check out `dired-hacks`. ;; Expanded dired. ;; Enables jumping to the current directory in dired (default: C-x C-j). (use-package dired-x :ensure nil ;; Prevent certain files from showing up. ;; NOTE: Use C-x M-o to show omitted files. :hook (dired-mode . dired-omit-mode) :bind ("s-d" . dired-jump) :config (setq dired-omit-files (concat dired-omit-files "\\|\\.bk$\\|^\\.DS_Store$")) )
ImminentEffect · 2022-07-24 23:48
Prot is doing grate job of promoting Gnu, and Gnu Emacs. Love his videos, also System Craft have good tutorials about GNU Emacs and Guix. :)