Just an interesting little problem I've got going on with terminals. I'm using vim inside of gnome-terminal. I like to have 256 colours so I don't have to use gVIM.
My relevant .zshrc settings are:
export TERM=xterm-256color
My relevant .vimrc settings are:
if $COLORTERM == 'gnome-terminal'
set t_Co=256
endif
You'll notice from this showterm what the problem is: http://showterm.io/06460aeb043cac4bd0256
I'm getting a weird background colour with the tmux vim. Any help on this would be great.
This is just a quick investigation.
The flow of these variables.
The problem is that tmux support 256 color correctly only if TERM="screen-256color" instead of "xterm-256color".
Below is a solution:
First, add this to your .zshrc(I use bash syntax):
Second, add this to your "~/.tmux.conf":
Last, vim settings is not needed.
Any further questions, please comment.