How to change background color in vim terminal?
7,069
It may be related to your $TERM env var.
See what $TERM is currently set to:
echo $TERM;
I tested this export TERM=xterm-256color
on a newer version of macos with vim 8.0. and :terminal
is correctly displaying a white background.
Related videos on Youtube
Author by
KiYugadgeter
Updated on September 18, 2022Comments
-
KiYugadgeter over 1 year
I am using vim terminal. (
:terminal
)
(Vim terminal is recently added feature of vim, You could see detail with:help terminal
in recently vim. I am not asking about vim on terminal.)Background color in terminal window become gray like following picture, But I want to change it to white.
How do I do it?
Upside pane is terminal window, Downside one is editor window.
My color settings in vimrc:
background=light colorscheme default t_Co=256
Note that I using console vim that installed with homebrew, not gvim
OS: macOS 10.12.6 Vim 8.0
-
Admin over 6 yearsIn vim generally for some reason, white isn't white. You can check with
hi Normal ctermbg=white ctermfg=black
. Instead, use231
instead ofwhite
. However, this doesn't work forhi Terminal
. Changingctermbg
works in general, but not to231
. I guess it's just a bug. -
Admin over 6 yearsYep, it's a bug.
-