The colors you see are in order limited by the "physical" capabilities of your terminal emulator, but their number is usually changed by the TERM environment variable, which is used by programs to determine how much they can be in their coloring.
In a simplified form ...
when Vim checks your TERM and sees a value containing 256 , it assumes that your terminal emulator is capable of displaying 256 colors and acts accordingly.
when your TERM is xterm or screen (among others), Wim assumes your terminal emulator is only able to display 8 colors and acts accordingly.
Assuming your current TERM in your local terminal emulator is xterm-256color , and none of the intermediate *rc sets a specific TERM :
WHERE TERM COLORS -------------------------------------------------------------- local xterm-256color 256 local > vim xterm-256color 256 local > remote xterm-256color 256 local > remote > vim xterm-256color 256 local > remote > remote > remote > remote > remote > remote > > remote > remote > remote > remote xterm-256color 256 local > remote > tmux screen 8 local > remote > tmux > vim screen 8 local > tmux screen 8 local > tmux > vim screen 8 local > tmux > remote screen 8 local > tmux > remote > tmux screen 8 local > tmux > remote > tmux > vim screen 8
Tmux, as a terminal multiplexer, acts as if it were a terminal emulator and changes its TERM so that tmux defaults to screen , and that the new value is passed down the chain.
If you want tmux and fancy colors everywhere, you need to configure each tmux to use the 256 colors that TERM . Put this line in ~/.tmux.conf on every machine you enter, including yours:
set-option -g default-terminal "screen-256color"
source share