Validus Oculus
Validus Oculus

Reputation: 2701

How to change vim buffer color?

I was customizing my vim colorscheme (it is based on ci_dark theme) but I could not figure out what sets the blue color for my buffer names. That blue color indicates the buffer which is visible in one of the split but it is not active. AFAIK, only color groups related to this is following three but I must be missing something. I would like to change blue color. Could you please help me?

Thank you!

enter image description here

call s:HL('TabLine', s:colors.none, s:colors.none)
call s:HL('TabLineFill', s:colors.none, s:colors.none)
call s:HL('TabLineSel', s:colors.black, s:colors.red)   

Upvotes: 1

Views: 1431

Answers (1)

Validus Oculus
Validus Oculus

Reputation: 2701

I found the answer to this by reading bunch of documentations. Let me share it with you in case you encounter the same problem in the future.

I found that colors of the tabs are set by the plugin that I am using. The documentation indicates which highlight group it is using. This was the reason I was getting weird combination. In my case, the PmenuSel was different than the TabLineSel, therefore it was causing the color difference.

https://github.com/ap/vim-buftabline/blob/master/doc/buftabline.txt

The highlight groups and their default links are as follows:

    Custom group             Default link      Meaning
    *BufTabLineCurrent*        |TabLineSel|        Buffer shown in current window
    *BufTabLineActive*         |PmenuSel|          Buffer shown in other window
    *BufTabLineHidden*         |TabLine|           Buffer not currently visible
    *BufTabLineFill*           |TabLineFill|       Empty area

The color scheme that I am using is ci_dark. I had configured it for my taste already so I just added following line to solve this problem.

" BufTabLine
" ----------------------------------------------------
call s:HL('BufTabLineActive', s:colors.foreground, s:colors.background)    

Upvotes: 2

Related Questions