Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 447
Winicius Iago Avatar asked Feb 04 '14 13:02

Winicius Iago


1 Answers

The recommended setting for tmux is

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

and you don't need

set t_Co=256

in your ~/.vimrc.

like image 187
romainl Avatar answered Oct 14 '22 17:10

romainl