The terminal i'm using is termite, and it is very good, but i'm having a problem with vim colorschemes and some colors in the terminal itself too when using tmux. It happens as follows:
As you can see in the screenshot, when i open nvim or vim with tmux, the case on the left, the colorscheme gets altered, this happens with all colorschemes i tested (about 15 or 20). I observed, that when i execute the command
TERM=xterm-256color tmux
right after i enter termite, the nvim/vim (i simlinked my .vimrc, so it is the same as init.vim) colorschemes works like a charm! I'm using i3-gaps, so, i decided to set the binding, $mod+Return to open termite that way:
bindsym $mod+Return exec termite -e 'TERM=xterm-256color tmux'
It should have worked, but when i press the keys, the screen only blinks and nothing happens.
Things i've tried include:
Set
$TERM
to various values, both in termite, in ~/.tmux.conf.local and in my .vimrc:xterm-256color, screen-256color, termite-256color
;Tested the same thing with other terminal emulators, like xfce-terminal and gnome-terminal, in both it works normally, and the colors get displayed correctly;
Set in my .vimrc:
`if &term == "screen"` `set t_Co=256` `endif`
Starting tmux with
tmux -2
;Aliasing in my .zshrc:
tmux="tmux -2"; tmux="TERM=xterm-256color tmux" (screen blinks and nothing happens); termite="termite --exec "TERM=xterm-256color tmux"; termite="termite -e "TERM=xterm-256color tmux".
Edit: The $TERM inside and outside tmux continue to be the same as the terminal. It outputs the same thing when I echo $TERM
inside and outside tmux. This happened with termite, have to test it with other terminals.
tmux
? you may need to specify totmux
that it's using a 256 color capable terminal, as well as lettingtermite
know.screen-256color
. I read in the FAQ, that is not recommend to set it to anything else, I tried, anyway, to set it to other values, with no success.