bufferline.nvim icon indicating copy to clipboard operation
bufferline.nvim copied to clipboard

[Feature request] Add option to not center tabs when scrolling

Open sarmong opened this issue 3 years ago • 4 comments

I always lose track of the buffer I am at because buffers get shifted all the time.

It is easier to show than explain.

Here's what it looks like in bufferline.nvim: Peek 2022-05-11 08-33

Here's how it looks like in barbar: Peek 2022-05-11 08-36

An option to change this setting would be nice.

sarmong avatar May 11 '22 05:05 sarmong

@sarmong I think for the time being if you prefer the way barbar handles it, it will be better to stick with that plugin, what you describe as an option would be quite a big change it's definitely possible maybe preferable I'm not sure, but basically this plugin went one way and barbar another on how it behaves.

It's not an issue of a simple if statement, at a glance it would be much easier to maintain one approach or the other i.e. use truncation markers and keep things centered or do what barbar does. Frankly I don't know currently which I'd prefer but I would almost certainly not try and maintain both, I worry about everyone else who won't like this change and it'll frankly be probably a chunk of work.

akinsho avatar May 11 '22 06:05 akinsho

Tbh I've gotten quite a few feature requests across my repos just this morning. Would be really great to see some requester step up and look into how/if they could implement the functionality they want 🙏🏾

akinsho avatar May 11 '22 06:05 akinsho

@sarmong just to be absolutely clear, this is a not a no. If you are willing to take the time to look into an implementation as an option, please go ahead. You can probably do it by making the truncation logic optional and in the else clause you could look at how to handle advancing the tabline as a user navigates backward and forwards and reaches the end

akinsho avatar May 14 '22 21:05 akinsho

Thanks. I am still working on the best way to approach buffers, tabs. marks in my workflow, but if I am going to stick to bufferline, I will look into this

sarmong avatar May 24 '22 11:05 sarmong