Reputation: 353
I am new to tmux and also not an expert on VIM, I tried to use tmux these days, but seems that airline disappeared when I used vim inside tmux. I would like to show you the screen shots and hopefully anyone can help me solve this problem.
Upvotes: 6
Views: 3124
Reputation: 4607
In my case, using ubuntu 20.04 inside windows with WSL2, the accepted answer (export TERM=screen-256color
), just freeze the tmux pane.
The fix for me was add to ~/.vim/vimrc
:
set t_Co=256
Upvotes: 1
Reputation: 481
Add the following line in your .tmux.conf
set -g default-terminal screen-256color
Upvotes: 1
Reputation:
While the accepted answer works, it is not cheap. Manually setting the value of the $TERM
variable will usually be set correctly by itself.
It is usually a good a idea to force tmux to assume the terminal supports 256 colors.
In your ~/.bash_aliases
, add:
tmux='tmux -2'
Answer based on the following posts:
Upvotes: 3
Reputation: 1976
You need to correctly set $TERM
environment variable to make vim properly detect 256 colors support by doing the following before opening vim:
export TERM=screen-256color
Upvotes: 8