When I load up vim inside tmux there is a background color behind all text as so:
If I load it up not in tmux I get the following:
I want it to be like image 2, I can not understand why tmux is interfering?
When I load up vim inside tmux there is a background color behind all text as so:
If I load it up not in tmux I get the following:
I want it to be like image 2, I can not understand why tmux is interfering?
Add this line to your tmux.conf
file
set -g default-terminal "screen-256color"
Add the line below to you shells rc file in my case its my .zshrc
if [[ $TERM == xterm ]]; then TERM=xterm-256color; fi
Add the line below to your .vimrc
set t_Co=256
The above configuration works for me, but if this fails try to follow this link for another methor to fix Fixing Vim's Background Color
.vimrc
also: set term=xterm-256color
, so my .tmux.conf
still has set -g default-terminal "screen-256color"
. Setting them both as xterm-256color
or screen-256color
didn't work.
Commented
Jan 21, 2021 at 4:28