Giter Site home page Giter Site logo

Comments (3)

ap avatar ap commented on August 20, 2024

Glad you like it enough to suggest an improvement. 😊

That looks nice, so if you have a concrete idea for how to implement this, I’m interested.

Like, what is it supposed to do with (say) 30 files rather than just 3? Where do the inactive tabs go – all on one side? If yes, does this mean opening a vertical split cuts the available space in the tabline in half? Or is the rest of the tabline supposed to flow β€œunder” the active tabs? Or, do you envision the plugin tracking which window the tabs were shown in last? But then what if you have the same buffer open in multiple windows? And if you sometimes look at a buffer in one window and sometimes in the other, does the tab jump from side to side?

Also, how does this scale to any layout besides two windows in a vertical split? If opening one vertical split halves the tabline, does opening more of them slice it into ever smaller pieces? Does it simply completely ignore the windows below the topmost horizontal split? Then what does it show if one of these windows is active?

How does all this intersect with the <Plug> mappings?

The screenshot covers the one easy, obvious case. I’m not interested in limiting the plugin to just that case – simply because my own use of Vim is not limited to it – so the other scenarios need solutions before I can consider this design. And I’ll confess to not feeling pressed to figure out the answers myself, because I am content with the way it handles splits right now. 😊

However – I am sincerely curious to hear about concrete ideas for how this design could scale. Maybe I’ll actually like such a proposal better than what I have now.

from vim-buftabline.

gibfahn avatar gibfahn commented on August 20, 2024

I can't imagine going back to the old vim -p style. I've got nnoremap <Tab> :bn<CR> and nnoremap <S-Tab> :bp<CR> and it works like a charm.

So as I understand it once you have more tabs open than can fit on the screen, you get a horizontally scrolling list of tabs, with your currently open buffer highlighted and any buffers open in other splits less highlighted. I don't think you'd want to start halving the tabline for each split, otherwise you'd end up not being able to see any of the other tabs. Therefore the other tabs would have to flow under the active tabs.

image

Thinking about it more, I guess you already know the filenames you have open because of the statusline at the bottom of each window, so having this would be duplicating information. However when you're changing buffers frequently, it's hard to keep track of which buffer is open in which tab, so I do think it'd be worth having.

I think what I'd find most useful would be for the tabline to be as it is currently, but for the buffer currently open in each split to be positioned at the top left of that split. There would be two ways of handling this, one would be to split the flow of the tabline around the raised tab, and the other would be to have a small gap before the raised tab. The latter would make it more obvious that the buffer name corresponds to the split.

For the plug mappings, I assume you mean this? I didn't actually know they existed, but assuming that they're just functions that skip n tabs, I don't think they'd be affected.

For horizontal splits, I'm not sure that there's much that could be done. Can you get a second tabline? Even if you could, I'm not sure you'd want to.

I'm not saying this is definitely a good idea, but I'm happy to think about it more. What other issues do you forsee?

from vim-buftabline.

gibfahn avatar gibfahn commented on August 20, 2024

I have since changed my theme, and I'm no longer finding this an issue at all.

image

I also spent some time trying to implement this while handling all the different edge-cases, and I didn't come up with anything that worked reliably.

Thanks for discussing it though!

from vim-buftabline.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.