Terminator + vim + solarized

3

2

I'm trying to get Solarized to work with my Terminator and Vim on Ubuntu 11.10. I've tried all kinds of terminator configs I found all over the web, but I can't get the result the way I want it.

When I use gnome-terminal, I get the correct colours in Vim with:

" Pathogen initialization
call pathogen#infect()
se t_Co=256
" ...
if has("gui_running")
  syntax on
  set hlsearch
  " Solarized http://ethanschoonover.com/solarized/vim-colors-solarized
  set background=light
  " let g:solarized_termcolors=16
  colorscheme solarized
else
  syntax on
  set hlsearch
  " Solarized http://ethanschoonover.com/solarized/vim-colors-solarized
  set background=dark
  let g:solarized_termcolors=16
  colorscheme solarized
endif

But when I go back to Terminator, with the settings from this page, the background colour of my Vim seems to be too light, making it hard to read the actual content of the file.

Nothing I've come across has worked for me so far. Can somebody share a working combination of .config/terminator/config and .vimrc?

Jens Geiregat

Posted 2012-03-22T12:22:18.987

Reputation: 33

Just a tip: you shouldn't just blindly set t_Co to 256 color mode because normally vim will detect this properly on its own. It isn't working for you with Terminator because Terminator uses gnome-terminal and gnome-terminal sets $TERM to xterm, whereas xterm-256color is normally used for a terminal that supports 256 colors. If you instead check for $COLORTERM == 'gnome-terminal' then you can detect gnome-terminal explicitly and compensate for the incorrect $TERM setting. – Michael Younkin – 2014-01-23T19:08:37.777

Answers

2

It is probably the setting:

let g:solarized_termcolors=256

Darek

Posted 2012-03-22T12:22:18.987

Reputation: 886

I almost can't believe it was that simple. Thanks! – Jens Geiregat – 2012-04-13T09:11:09.933

I just noticed that having a 'syntax on' in ftplugin files messes up solarized. Also confusing: while I set my background to dark, solarized seems to set it back to light, but shows the dark colors... – Jens Geiregat – 2012-07-11T08:28:21.843

What terminal are you using ? – Darek – 2012-07-11T11:14:57.500

I use terminator. – Jens Geiregat – 2012-08-13T13:09:19.343