3

I'm trying to use the light solarized theme with vim and xfce4-terminal.

I installed the theme for xfce4-terminal:

cd
mkdir solarized ; cd solarized
git clone https://github.com/sgerrand/xfce4-terminal-colors-solarized.git
cp xfce4-terminal-colors-solarized/light/terminalrc ~/.config/xfce4/terminal/

Apparently it works fine. However, when I use vim, the colors are different from the expected:

xfce4-terminal + vim + solarized (light)

Gvim presents the correct colors. Konsole (with the proper theme, from the same git repository) shows the correct colors too.

The dark theme is presented correctly if change the vim and the xfce4-terminal theme.

I tried to change TERM and t_Co, but it didn't work.

I tried to follow this answer but it remains with the incorrect colors.

The link above says that the xfce4-terminal devs have changed the syntax of terminalrc.

When I compare xfce4-terminal and konsole pallets, I see that the there are some colors different, so I think terminal isn't reading rightly the terminalrc archive. Since the terminalrc archive from git is 2 years old, it makes sense. However, I don't know how to modify to the correct colors since I don't know the correspondence between the pallets of Konsoleand Xfce.

Does anyone have a suitable archive? Does anyone want to create one and make it available via git, updating the config for other people? (presuming that it's in fact a problem with the recent syntax.)

Community
  • 1
  • 1
user35477
  • 151
  • 2
  • 12
  • It may be related [to the TERM environment variable](http://stackoverflow.com/questions/9832660/why-dont-most-vim-color-schemes-look-as-nice-as-the-screenshot-when-i-use-them/9833425#9833425) and `t_Co` – Michael Berkowski Mar 30 '14 at 14:24
  • I tried this tip too, but it didn't work. It seems to me that the problem has to do with xfce4-terminal. – user35477 Mar 30 '14 at 14:30
  • Did you consider asking on that project's issue tracker? – romainl Mar 30 '14 at 20:34

2 Answers2

5

oK got it work!

You cannot use the colors which are on git hub xfce4-terminal

For the dark you can use the one which comes with xfce-terminal (Edit->Properties->Color->Presets * Solarized (dark/light)

Important is that you go afterwards to ~/.config/xfce4/terminal/terminalrc and remove

ColorCursor=

Than edit the .vimrc with

  syntax enable
  set background=dark
  colorscheme solarized
  set t_Co=16

set background=dark works for me with light and dark terminal setting.

Kais3n
  • 71
  • 4
  • 1
    It seems the background colors have been incorrectly swapped around in the sgerrand github repo. I manually swapped the light and dark colors so that the solarized light vim theme works in the xfce terminal conf: `ColorPalette=#070736364242;#dcdc32322f2f;#858599990000;#b5b589890000;#26268b8bd2d2;#d3d336368282;#2a2aa1a19898;#eeeee8e8d5d5;#00002b2b3636;#cbcb4b4b1616;#9393a1a1a1a1;#838394949696;#656 57b7b8383;#6c6c7171c4c4;#58586e6e7575;#fdfdf6f6e3e3` – mandrake Sep 01 '15 at 08:06
2

I have exactly the same problem. I get the best results with this. It is not 100% the same but looks best to me

let g:solarized_termcolors=256
syntax enable
set background=light
colorscheme solarized
set t_Co=256

Hope that helps

Kais3n
  • 71
  • 4