Ubuntu + Tmux + Vim color issue

I am using tmux 2.1, terminator 0.97 and vim 7.4 on ubuntu Trusty 14.04

The Vim color scheme is solarized - dark. The colors are great outside of tmux, but when using tmux they are slightly different.

The difference is that the background is slightly brighter using base02 instead of base03 as the background (cf http://ethanschoonover.com/solarized ).

I searched a lot of color issue reports with tmux, and I tried almost any combination of settings for vim and tmux.

I have t_Co = 256 in vim. Also tried t_Co = 16

set -g default-terminal "xterm" or "screen" or "screen-256color" does not change anything.

When I try "xterm-256color", the background is base03, but base02 selects almost all of the text. Colors are still spoiled.

This also happens with gnome-terminal. Both the terminator and the gnome terminal have a sunny theme and a color palette.

My macbook pro has the same .vimrc and .tmux.conf settings, and everything is fine.

Any idea how I could fix this?

EDIT: I have no color problems with sshing + tmux from my laptop, so this is most likely a problem with terminal emulators on ubuntu.

+4
source share
2 answers

I solved the problem by setting TERM = screen-256color in .zshrc

Depending on your terminal and shell, you can use TERM = xterm-256color and .bashrc instead.

For some reason, setting -g default-terminal "screen-256color" to .tmux.conf was not enough.

+6
source

You tried:

let g:solarized_termtrans = 0 or 1
let g:solarized_degrade = 0 or 1
let g:solarized_contrast = "normal" or "high" or "low"

?

, Solarized , , . gnome-terminal Edit > Profile Preferences > tab Colors mannualy . https://github.com/vim-scripts/Solarized .

+1

Source: https://habr.com/ru/post/1626083/


All Articles