Make Vim use the terminal colors again

1.2k Views Asked by At

I use Xfce4, and it seems that its terminal has been upgraded and now either supports 256 colors or is true-color (I'm not sure). These seem to be the relevant variables it exports:

COLORTERM=truecolor
TERM=xterm-256color

One of the unexpected changes it has caused is that now Vim no longer respects my palette. Instead, it is using its own set of colors. Moreover, it automatically sets bg=dark for some reason.

The closest I get to the colors I'm used to is setting colorscheme peachpuff. But what I would really like is to have Vim honouring the 16 colors that I chose to compose my palette over years of terminal usage.

I have searched for an answer, but the "closest" I found to an answer was actually the opposite of what I'm looking for.    :)

1

There are 1 best solutions below

0
On BEST ANSWER

You could redefine TERM just when you invoke vim, with the terminal you want it to run with with:

TERM=vt100 vim  # instead of simply: vim

(even create an alias or a function for this)

VAR=value a_command  #invokes a_command, + temporarily sets in its environment: VAR=value
                     #This assignement is not done on the rest of your shell.

Other popular TERM values: xterm , or xterm-color