vim + tmux visual mode not highlighting


When I run vim in tmux, the syntax highlighting works fine except for the visual mode, it works but doesn’t change the colors of the selected text, which I find quite annoying.

The problem stays the same even when I switch the colorscheme(I am currently using molokai)
I have the option set t_Co=256 on my vimrc
My .tmux.conf file is the same as the t-williams.conf example(just added the line “set -f default-terminal “xterm””)

I already tried some solutions to problems related to the 256 color support

any tips?


The recommended setting for tmux is

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

and you don’t need

set t_Co=256

in your ~/.vimrc.

Answered By – romainl

Answer Checked By – Dawn Plyler (AngularFixing Volunteer)

Leave a Reply

Your email address will not be published.