I have a dired workflow that I like. From a file-visiting buffer, I'll use dired-jump
to pop up to the containing directory. Dired renders the directory in a new buffer with the cursor on the file-entry I came from. Another dired-jump
puts me in the parent directory with the cursor on the subdirectory I was in. This makes it easy to drill back down with a series of Return keypresses.
The downside is that dired generates a lot of buffers in order to build such a "breadcrumb" trail. I mitigate this somewhat by reusing buffers on my way down, using dired-find-alternate-file
. But I still end up with multiple dired buffers littering the buffer list, so I'd like to find an easy way to toggle hiding dired buffers in IBuffer.
As an example, with a file-tree like,
~
├── A
└── B
├── x
└── y
and starting from the file ~/B/y
, running dired-jump
results in (using |
to represent the cursor position):
buffer contents buffer list
--------------- -----------
~/B: ~/B/
. ~/B/y
..
x
y|
Another dired-jump
:
buffer contents buffer list
--------------- -----------
~: ~/
. ~/B/
.. ~/B/y
A
B|
Then find-alternate-file
:
buffer contents buffer list
--------------- -----------
~/B: ~/B/
. ~/B/y
..
x
y|
And another find-alternate-file
puts me back into file y, with only ~/B/y
in my buffer list.