Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use tmux with solarized colors (256), and it works fine, except when I hit the key I have binded to: new-window "vim somefile".

It opens the new window with strange colors, probably like if I had less than 256 enabled.

Why could that be and how could I fix it?

share|improve this question

Yeah. run tmux as

tmux -2 (forces 256 colors)

In your tmux.config put

set -g default-terminal "screen-256color"

In your vimrc put

set t_Co=256

set term=screen-256color

AND in your shell that tmux is running you'll have to put

export TERM="screen-256color"

My experience has been that it only works when you tell every single one of them to shut up and pretend they have 256 colors. Otherwise one of them will think they know better and fall back to 16 or 8.

But if your force it make sure you actually do have 256 colors available in the terminal. Otherwise you'll end up with some strange stuff.

It took me way too long to figure all of that out.

It got easier once I started building all three from source.

They are riddled with bugs in the older versions.

(apparently others have had success with "xterm-256color", but that did not work for me. You're just going to have to try.)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.