vim - solarized color theme not working properly in tmux -


i'm on ubuntu 14.04, installed:

  1. konsole
  2. tmux 1.9.6
  3. vim 7.4.52

when directly start vim in konsole, it's working fine.
if start vim in tmux, there's coloring issues annoying, please see below screenshot.

here's part of color setting in vimrc:

set background=light let g:solarized_termcolors=256 set t_co=256 colorscheme solarized 

where's problem? here?

enter image description here

this due wrong term environment variable value. tmux pretty explicit should either screen or screen-256color.

you can first check have typing inside tmux echo $term.

the usual fix add line .tmux.conf:

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

restarting tmux recommended after this. now, when executing echo $term inside tmux, output should screen-256color. if not, term variable overridden in .bashrc (you wanna delete there or set conditionally).


Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -