Terminator + vim + solarized

6,961

It is probably the setting:

let g:solarized_termcolors=256
Share:
6,961

Related videos on Youtube

Jens Geiregat
Author by

Jens Geiregat

Updated on September 18, 2022

Comments

  • Jens Geiregat
    Jens Geiregat over 1 year

    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?

    • Michael Younkin
      Michael Younkin over 10 years
      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.
  • Jens Geiregat
    Jens Geiregat about 12 years
    I almost can't believe it was that simple. Thanks!
  • Darek
    Darek almost 12 years
    What terminal are you using ?
  • Jens Geiregat
    Jens Geiregat over 11 years
    I use terminator.