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.
airline.vim does not work inside tmux
Asked Answered
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
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:
Add the following line in your .tmux.conf
set -g default-terminal screen-256color
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
© 2022 - 2024 — McMap. All rights reserved.