0
OSX - sierra
iterm2 3.0.13
tmux 2.3
vim 8.0.176

colors work fine in bare iterm2:

enter image description here

but under tmux:

enter image description here

iterm2:

echo $TERM
xterm-256color

tmux:

echo $TERM
screen-256color

tmux config

enter image description here

vimrc

enter image description here

I'm running out of ideas. and google foo is not helping.

0

A search for 'tmux vim colors wrong' turned up this answer. Start tmux with the -2 option to force 256 colors.

  • It's supposed to force tmux into 256 color mode. I've got that aliased in my configuration files and don't have the terminal-overrides in my tmux configuration. – Keith Prussing Jan 14 '17 at 17:17
0

t_* is needed because these are not set automatically by vim for anything but xterm. But tmux only supports screen-256

:h xterm-true-color

Moving t_8f and t_8b below set termguicolors fixed my problem.

long version: https://github.com/vim/vim/issues/993

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy