4

I have installed tmux with vim, using the solarized colorscheme and airline plugin. All is good until I start tmux, where all the font turns bold and the airline status bar is looking weird. I have heard this is a common problem when using iTerm2 which I am.
I have tried literally every solution I can find and nothing seems to work

Here is what echo $TERM is displaying:

  • Using tmux - screen
  • Not using tmux - xterm-256color

I have added set -g default-terminal "tmux" to my tmux.conf
and I have added [ -n "$TMUX" ] && export TERM=screen-256color to my bashrc file.

2

The problem is that the color theme asks for more color than exist in the tmux terminal description, and vim is using bold to replace some of the missing colors.

Rather than

set -g default-terminal "tmux"

use a terminal description which has a comparable number of colors, e.g.,

set -g default-terminal "tmux-256color"

If your terminal database has "tmux", it likely has the other, since both were added in May 2015:

# 2015-05-02
#       + remove unnecessary ';' from E3 capabilities -TD
#       + add tmux entry, derived from screen (patch by Nicholas Marriott).
#       + split-out recent change to nsterm-bce as nsterm-build326, and add
#         nsterm-build342 to reflect changes with successive releases of OSX
#         (discussion with Leonardo B Schenkel)
#       + add xon, ich1, il1 to ibm3161 (patch by Stephen Powell,
#         Debian #783806)
#
# 2015-05-17
#       + remove screen-bce.mlterm, since mlterm does not do "bce" -TD
#       + add several screen.XXX entries to support the respective variations
#         for 256 colors -TD

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.