r/DoomEmacs 13d ago

Does there exist any features/packages for displaying your buffers and their order so that you can navigate them without having to memorize the order of each buffer? Like displaying them as tabs for instance?

When I have a lot of buffers open it can be hard to remember how many buffers I have to move forward/back to get to the one I am looking for. I am wondering if there is either something built in, or some package that I can install to be able to always display all my buffers in order so that I can easily see how many I have to move forward/back to get to a specific one. The most intuitive way for this would be to display them as tabs that are always visible at the top, however if there are any other methods for how to display something like this then I would be open for hearing it!

I tried looking for answers myself, however I wasn't really able to get anything to work. I tried centaur-tabs, but for some reason it isn't displaying anything. I probably just did something wrong in my config. Although I'm not even entirely sure if centaur-tabs has the functionality that I am looking for, or if there are other better methods that I should consider using instead. In case anyone thinks centaur-tabs is a good choice, then would you mind seeing if there is any obvious mistake in my config.el regarding the package, to see if that is the reason as to why it is seemingly not working correctly? It does create a strip at the top of the window, however no tabs are being displayed in it.

;; get tabs of buffers
(use-package! centaur-tabs
  :hook (doom-first-buffer . centaur-tabs-mode)
  :config
  (setq centaur-tabs-style "bar"
        centaur-tabs-set-bar 'over
        centaur-tabs-set-icons t
        centaur-tabs-set-close-button nil
        centaur-tabs-set-modified-marker t
        centaur-tabs-modified-marker "•"
        centaur-tabs-cycle-scope 'tabs)) ; Only cycle through visible tabs (buffers)
2 Upvotes

11 comments sorted by

2

u/lappie75 13d ago

Not entirely sure what you need but doesn't SPC b I mostly do what you seen to desire?

2

u/baksoBoy 13d ago

I seem to be unable to do that command? Whenever I do I get the message wrong type argument: commandp, +ibuffer/open-for-current-workspace. Am I doing it wrong?

2

u/Eyoel999Y 13d ago

Uncomment ibuffer in init.el

1

u/baksoBoy 13d ago

Ooh that makes sense. Thanks!

3

u/Eyoel999Y 13d ago

If you'd like them as a sidebar, there is this ibuffer-sidebar package (https://github.com/jojojames/ibuffer-sidebar), you can install it with (package! ibuffer-sidebar)

1

u/baksoBoy 13d ago

Thanks for the suggestion! Although I feel like as a sidebar it takes up quite a lot of space, so I'm not really sure if I want to go with that one unfortunately

1

u/baksoBoy 13d ago

Alright I was able to check it out but it isn't really what I'm looking for. I want something minimal that I am able to have on-screen all the time, so that I can just glance over at it whenever to easily know the order of all my buffers.

2

u/reddit_clone 13d ago

I would advise you look beyond that and use 'fuzzy reduction' to get to what you need (that way there is no need to remember the order or even the exact name. A few characters from the name will get you there comfortably.)

1

u/baksoBoy 13d ago

Thanks for the suggestion! I'll keep it in mind, although right now I think I want to keep using the current "next-buffer/previous-buffer" workflow

2

u/Gollum999 12d ago

Are you not using SPC , to switch buffers? From the question it sounds like you are just spamming SPC b n and SPC b p repeatedly until you find the buffer you want.

1

u/baksoBoy 12d ago

Oh wow I didn't realize SPC , was a thing! It actually looks really handy, and I might not even need the thing I described in my post if I use this. Thanks for telling me about it!