terminal background turn gray when open in vim

326 Views Asked by At

I'm using vim in zsh in wsl, playing with it's color setting.

I want to use colorscheme solarized for my vim, but it caused the background of terminal color to gray (open in vim by using :ter)

How can I avoid it?

I know that I can use :!(command) or ctrl + a and fg to use terminal while editing in vim, but I'm just curious.

terminal background color turned gray

terminal background color turned normal

1

There are 1 best solutions below

0
romainl On

The problem

Like many other (inexplicably) popular colorschemes, Solarized has been abandoned for a long time. One consequence is that features like :help hl-Terminal and :help g:terminal_ansi_colors, that were introduced in the meantime, are not supported.

Your options

  • Edit the colorscheme directly.
  • Override it with an autocommand, as per this gist.
  • Find an up-to-date fork.
  • Find another, well maintained, colorscheme.