Closed jyzeng17 closed 5 years ago
Btw I've tried other themes and they don't have this problem.
The problem is the statusline highlighting?
what base16 theme did you use?
Yeah the whole statusline is hightlighted when I press <Tab>
to call the command completion menu. The appearances before and after I write something to the file are different.
I set let g:airline_theme='base16'
in my startup vim script.
I just tried in a standard Vim:
What is your output of :hi WildMenu
. Mine is
WildMenu xxx term=standout cterm=bold ctermfg=161 ctermbg=237 gui=bold
guifg=#df005f guibg=#3a3a3a
Please also check with a standard Vim installation.
Also please check if the 'termguicolors' setting changes anything
And finally, what colorscheme are you using? Try this: :verbose :hi WildMenu
I tested in my Vim and I found it behaves exactly as my Neovim does. Also I noticed that whether I start Vim with files argument or not will lead to different changes of my wildmenu color. I didn't set 'termguicolors' and I used gruvbox colorscheme when I tested, I'm not sure if this affects the result so I also tested with no colorscheme set.
Vim version:
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Nov 24 2016 16:44:48)
Included patches: 1-1689
Extra patches: 8.0.0056
Modified by pkg-vim-maintainers@lists.alioth.debian.org
Compiled by pkg-vim-maintainers@lists.alioth.debian.org
Huge version without GUI. Features included (+) or not (-):
+acl +farsi +mouse_netterm +tag_binary
+arabic +file_in_path +mouse_sgr +tag_old_static
+autocmd +find_in_path -mouse_sysmouse -tag_any_white
-balloon_eval +float +mouse_urxvt -tcl
-browse +folding +mouse_xterm +terminfo
++builtin_terms -footer +multi_byte +termresponse
+byte_offset +fork() +multi_lang +textobjects
+channel +gettext -mzscheme +timers
+cindent -hangul_input +netbeans_intg +title
-clientserver +iconv +packages -toolbar
-clipboard +insert_expand +path_extra +user_commands
+cmdline_compl +job -perl +vertsplit
+cmdline_hist +jumplist +persistent_undo +virtualedit
+cmdline_info +keymap +postscript +visual
+comments +langmap +printer +visualextra
+conceal +libcall +profile +viminfo
+cryptv +linebreak -python +vreplace
+cscope +lispindent +python3 +wildignore
+cursorbind +listcmds +quickfix +wildmenu
+cursorshape +localmap +reltime +windows
+dialog_con -lua +rightleft +writebackup
+diff +menu -ruby -X11
+digraphs +mksession +scrollbind -xfontset
-dnd +modify_fname +signs -xim
-ebcdic +mouse +smartindent -xsmp
+emacs_tags -mouseshape +startuptime -xterm_clipboard
+eval +mouse_dec +statusline -xterm_save
+ex_extra +mouse_gpm -sun_workshop -xpm
+extra_search -mouse_jsbterm +syntax
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -Wdate-time -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim -lm -ltinfo -lnsl -lselinux -lacl -lattr -lgpm -ldl -L/usr/lib/python3.5/config-3.5m-x86_64-linux-gnu -lpython3.5m -lpthread -ldl -lutil -lm
Open no file with no colorscheme: works normally
Open no file with gruvbox colorscheme:
WildMenu xxx term=standout cterm=bold ctermfg=109 ctermbg=239 gui=bold
guifg=#83a598 guibg=#504945
Last set from ~/.vim/bundle/gruvbox/colors/gruvbox.vim
Open files with no colorscheme:
WildMenu xxx term=standout ctermfg=0 ctermbg=11 guifg=Black guibg=Yellow
Open files with gruvbox colorscheme:
WildMenu xxx term=standout cterm=bold ctermfg=109 ctermbg=239 gui=bold
guifg=#83a598 guibg=#504945
Last set from ~/.vim/bundle/gruvbox/colors/gruvbox.vim
hm, perhaps your terminal does not show more than 16 colors? Does :set t_Co=256
fix it?
Btw what terminal is this? When that happens (and the output is unreadable), what is the output of :hi WildMenu
and :hi StatusLine
?
My terminal is GNOME Terminal 3.18.3. :set t_Co=256
didn't fix it.
If I open a file with no colorscheme, the output of :hi WildMenu
after color changing:
WildMenu xxx term=standout ctermfg=0 ctermbg=11 guifg=Black guibg=Yellow
And the output of :hi StatusLine
in the same condition:
StatusLine xxx term=bold,reverse cterm=bold,reverse ctermfg=130 gui=bold,reverse
I am struggeling a bit with following your conversation. That looks like the contrast between those two highlighting groups should be okay, so the problem mentioned in the first message should not show up in this circumstance, right? Or is this when the completion (wildmenu mode) is almost invisible?
Well I think my problem now is that my wildmenu will automatically change its color right after I write something to the file. The first message is just it happened to change its color to one that looks like invisible (I guess it's because of my gruvbox colorscheme setting, so I remove the setting for my last comment. And the problem exists still, just switch to another color). Here's the highlighting groups output for my first message's situation:
Hm, it looks like the Statusline highlighting group is wrong at least for the terminal. See how ctermfg
equals ctermbg
(this means the foreground color is the same as the background color for the terminal, note that you cannot see the xxx
that should be present)?
Does this come from the gruvbox color scheme? Check :verbose :hi StatusLine
. If that comes from gruvbox, I suggest filing an issue there.
Looks like it's from vim-airline.
Now that is interesting. Ah found the problem and fixed it.
That solves the problem! Thank you.
OS: Ubuntu 16.04 Neovim: 0.3.0
I'm not sure if I should post it here, but it does not seem normal.