I installed tmux in iTerm 2.(Build 3.0.13) When I execute vim in tmux, syntax highlighting looks like this.
But outside tmux, syntax highlighting looks fine.
My $TERM inside and outside tmux is xterm-256color. I also added
set -g default-terminal "screen-256color"
in .tmux.conf and added this
set t_Co=256
set t_AB=m
set t_AF=m
if &term =~ '256color'
set t_ut=
endif
in .vimrc.
I also tried tmux -2 command and read these questions.
lose vim colorscheme in tmux mode
Incorrect colors with vim in iTerm2 using Solarized
Is this a problem of tmux, vim, or my configuration?
EDIT:
My .vimrc in GitHub Gist
https://gist.github.com/sohnryang/3c63397f332f2e30c7d7b2a83c3c9f52


-2option:tmux -2. Preferably when there are no sessions in tmux. – grodzik Dec 22 '16 at 14:17tmux -2, but the problem is same. – sohnryang Dec 22 '16 at 14:17.vimrc? – grodzik Dec 22 '16 at 18:25termguicolorsinstantly changes my syntax highlighting to black and white (but still highlights, if only in bold). – muru Dec 24 '16 at 13:13set termguicolorsin.vimrc, everything is same. – sohnryang Dec 25 '16 at 02:41termguicolorsafter pathogen, but problem persists. – sohnryang Dec 26 '16 at 10:02