# Vim not showing themes in terminal emulator



## michael_hackson (Jun 16, 2018)

Hello! Just a quicky. I wanted to have editors/vim display themes and it all works in x11/xterm but not in x11/lilyterm.

After some googling I found at one occasion that it was recommended to set the terminal emulator configs to go with the same theme as of Vim. Is this really necessary and the only way? 

Picture:



Can someone explain this? Any direction would be cool so it can be solved tomorrow. Google can't get me more since I am not certain what to look for.


----------



## m0nkey_ (Jun 16, 2018)

You may need to set your `TERM` environment variable to xterm-256color.

This is what I have in my .bash_profile

```
export TERM="xterm-256color"
```


----------



## michael_hackson (Jun 16, 2018)

m0nkey_ said:


> You may need to set your `TERM` environment variable to xterm-256color.
> 
> This is what I have in my .bash_profile
> 
> ...



Hmm. It doesn't change anything to set the TERM variable to that. Thanks though. There are some more configs needed to be made.

*Addition: *Considering how it looks I don't think that the truecolour support is the main thing here. I can imagine to tune the settings so the terminal will have the same colour theme as Vim itself but what I want is to have lilyterm to start Vim in the same way as xterm, since lilyterm should use the same settings as xterm, according to config.

Anyone running Vim with themes on x11/rxvt-unicode may be able to give me a hand since it's similar to the terminal I use.


----------



## k.jacker (Jun 24, 2018)

michael_hackson said:


> After some googling I found at one occasion that it was recommended to set the terminal emulator configs to go with the same theme as of Vim. Is this really necessary and the only way?


Doesn't make much sense to me.

The *TERM* environment variable is in case important. When set to "xterm", vim would only display colorcodes in the range from 1-8, it won't accept codes like "PaleGreen1" and the like.
The moment you set *TERM* to "xterm-256color" vim will accept 256 colorcodes and stuff like "PaleGreen1" and "Grey0" will work.

If you are on the default FreeBSD shell, which is csh (or tcsh) than you have to `setenv TERM xterm-256color`.
You should actually compare the environments from your xterm and lilyterm by simply typing `env` or `echo $TERM` in your terrminal to see what *TERM* is set to.


Out of curiosity I installed x11/lilyterm.
colorschemes in vim work for me in all terminals, including lilyterm, xterm and xfce4-terminal.

Can you explain a bit more what exactly isn't working... maybe we can figure it out. The following things come to my mind (though, without having an exact clue why you have that problem)

1. Does syntaxhighlighting work?
2. Do you have the same backgroundcolor in xterm and lilyterm?
3. Does (in vim) `:colorscheme desert` work. Do you get an error messager?
4. Does (in vim) `:echo $VIMRUNTIME` show /usr/local/share/vim/vim80?
5 What shell do you use?
6. What's the values of PATH and TERM of your environment?
7. Have you tried to run vim without ~/.vimrc ?


----------

