1

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?

1 Answer 1

2

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.)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .