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.

Share:
7,069

Related videos on Youtube

KiYugadgeter
Author by

KiYugadgeter

Updated on September 18, 2022

Comments

  • KiYugadgeter
    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?

    vim terminal 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
      Admin over 6 years
      In vim generally for some reason, white isn't white. You can check with hi Normal ctermbg=white ctermfg=black. Instead, use 231 instead of white. However, this doesn't work for hi Terminal. Changing ctermbg works in general, but not to 231. I guess it's just a bug.
    • Admin
      Admin over 6 years
      Yep, it's a bug.