So I'm looking for some insight into how to customize my ibuffer window. I don't know much lisp but have a decent amount of emacs experience.
I tried solving it based on some google searches:
and a few more links. I've tried various combinations of the tools they describe, but nothing does exactly what I want, which is roughly a combination of sorting by pathname, and filter groups. However, instead of predefined 'saved-filter-groups', I want to have filter groups based on the directory structure.
Ideally my ibuffer would display directory names as filter groups, and then sort the files alphabetically within each group. Also if possible, I would like the named directory filter groups to only display up to 3 parent directory levels
So if the buffers I have open are:
~/SomeDir/Foo/Bar/a/file_1a.js ~/SomeDir/Foo/Bar/a/file_2a.js ~/SomeDir/Foo/Bar/b/file_1b.js ~/SomeDir/Foo/Bar/b/file_2b.js
Then my ibuffer window would look like:
[ .../Foo/Bar/a ] file_1a.js file_2a.js [ .../Foo/Bar/b ] file_1b.js file_2b.js
While I'd love a complete solution, any insight or resources you could point me towards would be nice too.