I am using konsole-4.14.3, tmux-2.6, vim-7.4.1938 and my shell is bash. Outside tmux, my vim color scheme works properly. However, inside tmux the colors are completely different. I kind of know what the problem is, but not sure how to solve it.
The default $TERM value for my terminal is xterm. If I add
set -g default-terminal screen-256color
set -g terminal-overrides ',screen-256color:Tc'
to my ~/.tmux.conf and export TERM=screen-256color to my ~/.bashrc, vim colors work properly in tmux. However, changing the value of TERM makes line wrapping to stop working both outside and inside tmux.
How should I fix this?