vim-buffet
vim-buffet copied to clipboard
Strange background showing
I tried to achive the same looks as in screenshot of README and I say I only got something partial. Here is the actual screenshot
The green background throughout the tabline spoiled the looks. and also notice buffer are separating ini weird way (with black background and white seperator)
I found a workaround: just add "set termguicolors" to your .vimrc
I solved this problem finaly, you should replace "if has("gui") || has(”termguicolors)" to "if has("gui_running")" in buffet.vim and then modify some ctermfg or ctermbg to a name.
Here is the patch:
diff --git a/plugin/buffet.vim b/plugin/buffet.vim
index cb1e969..a24bfb4 100644
--- a/plugin/buffet.vim
+++ b/plugin/buffet.vim
@@ -11,7 +11,7 @@ augroup buffet_show_tabline
autocmd VimEnter,BufAdd,TabEnter * set showtabline=2
augroup END
-if has("gui") || has("termguicolors")
+if has("gui_running")
if !get(g:, "buffet_use_gui_tablne", 0)
set guioptions-=e
endif
@@ -111,7 +111,7 @@ endfor
function! s:GetHiAttr(name, attr)
let vim_mode = "cterm"
let attr_suffix = ""
- if has("gui") || has('termguicolors')
+ if has("gui_running")
let vim_mode = "gui"
let attr_suffix = "#"
endif
@@ -123,7 +123,7 @@ endfunction
function! s:SetHi(name, fg, bg)
let vim_mode = "cterm"
- if has("gui") || has("termguicolors")
+ if has("gui_running")
let vim_mode = "gui"
endif
@@ -157,16 +157,16 @@ function! s:SetColors()
" Issue: https://github.com/bagrat/vim-buffet/issues/5
" if get(g:, "buffet_match_color_scheme", 1)
- hi! BuffetCurrentBuffer cterm=NONE ctermbg=2 ctermfg=8 guibg=#00FF00 guifg=#000000
- hi! BuffetActiveBuffer cterm=NONE ctermbg=10 ctermfg=2 guibg=#999999 guifg=#00FF00
- hi! BuffetBuffer cterm=NONE ctermbg=10 ctermfg=8 guibg=#999999 guifg=#000000
+ hi! BuffetCurrentBuffer cterm=NONE ctermbg=green ctermfg=black guibg=#6aa84f guifg=#000000
+ hi! BuffetActiveBuffer cterm=NONE ctermbg=grey ctermfg=green guibg=#999999 guifg=#6aa84f
+ hi! BuffetBuffer cterm=NONE ctermbg=grey ctermfg=black guibg=#999999 guifg=#000000
hi! link BuffetModCurrentBuffer BuffetCurrentBuffer
hi! link BuffetModActiveBuffer BuffetActiveBuffer
hi! link BuffetModBuffer BuffetBuffer
- hi! BuffetTrunc cterm=bold ctermbg=11 ctermfg=8 guibg=#999999 guifg=#000000
- hi! BuffetTab cterm=NONE ctermbg=4 ctermfg=8 guibg=#0000FF guifg=#000000
+ hi! BuffetTrunc cterm=bold ctermbg=grey ctermfg=black guibg=#999999 guifg=#000000
+ hi! BuffetTab cterm=NONE ctermbg=blue ctermfg=black guibg=#3d85c6 guifg=#000000
hi! link BuffetLeftTrunc BuffetTrunc
hi! link BuffetRightTrunc BuffetTrunc
@@ -179,7 +179,7 @@ function! s:SetColors()
for left in keys(g:buffet_has_separator)
for right in keys(g:buffet_has_separator[left])
let vim_mode = "cterm"
- if has("gui") || has("termguicolors")
+ if has("gui_running")
let vim_mode = "gui"
endif