I connect to a server via SSH from xfce4-terminal.
Vim does recognize that this is a 256-color terminal, since t_Co gets set to 256.
I found out that entering
:set background=dark in vim fixes the colorscheme, however, that isn't the proper fix, because this only inverses the problem (i.e. it causes vim to use bright colors with a terminal with light background).
How do I make vim correctly determine background color while in tmux, without setting it explicitly?
Ouside of tmux,
$TERM is equal to
set -g default-terminal "screen-256color"
screen-256color. Changing terminal type to
xterm-256color didn't help.