Giter Site home page Giter Site logo

Comments (3)

ap avatar ap commented on August 20, 2024 1

No, that’s just how the colorscheme you’re using looks:

  • The init.vim label in your first screenshot is how the selected tab looks in your colorscheme, which BufTabLine uses for the buffer in the focused window
  • The install.sh label in the second screenshot is how unselected tabs look in your colourscheme, which BufTabLine uses for hidden buffers (= not displayed in any window)
  • The init.vim label in your second screenshot is how the completion menu selection looks in your colourscheme, which BufTabLine uses for buffers shown only in windows which aren’t focused

In the second screenshot, none of your actual buffers has focus. The focus in that screenshot is on an unlisted buffer created by NERDTree. Compare the output of :ls and :ls! to see what I mean. BufTabLine doesn’t show unlisted buffers. So all visible listed buffers are highlighted like the completion menu selection, which in your colorscheme has that dark on bluish look.

As for the colorscheme definitions used by BufTabLine – plain Vim unfortunately only defines two highlight group for tabs: one for the selected tab and one for other tabs. But BufTabLine needs a third option… so I filled it in by taking one of the completion menu highlight groups. Whether that will work well with any given colorscheme is basically a crapshoot… but most of the time it seems to work well enough that nobody notices.

If you want to keep using this colorscheme and you don’t like how it looks, you can petition the author of the colorscheme to support BufTabLine explicitly – it sets up its own highlight groups for that purpose, documented under :help buftabline-colors. Alternatively, if you don’t want to do that, or if you can’t, you can redefine the colors yourself in your vimrc, as documented in :help :hi-link (with available highlight groups listed in :help highlight-groups).

Does that help?

from vim-buftabline.

ap avatar ap commented on August 20, 2024 1

No, that’s almost exactly right, just without the default keyword.

The purpose of default is to say that this link doesn’t override an already-created link without the default keyword, if there is one. The idea is that colorschemes and plugins etc should create default links while the user’s configuration creates non-default links, and that way the user’s links won’t get overridden regardless of the load order of everything. Basically you can think of default like an equivalent to !important in CSS, just with the opposite effect on priority (!unimportant?).

At least, that’s the intended usage. I don’t know if that mechanism ever made all that much sense (you can put your hi link commands after your colorscheme command, after all), but in today’s world of bundles/packages, it seems particularly obsolete – a special one-off mechanism to work around load order just for colorscheme stuff, from an older time when you would just dump everything straight into ~/.vim/colors/ and ~/.vim/plugin etc and hope for the best.

But… since it’s designed that way… might as well use it like that, even when it doesn’t end up mattering in practice.

from vim-buftabline.

jensbambauer avatar jensbambauer commented on August 20, 2024

That makes sense, thank you.
I got confused because the blue background looks like this should be selected.

For now I'll add
hi default link BufTabLineActive TabLineSel
hi default link BufTabLineCurrent PmenuSel

to my vimrc. Is that a bad idea?

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.