Sample Header Ad - 728x90

terminal in Tmux is 256color but vim isn't

0 votes
1 answer
1908 views
Recently I installed tmux on my Ubuntu 16.04. The terminal screen in tmux shows 256 color correctly however when I opened vim within tmux, the color was different from what it showed when it was run directly on the terminal. I tried to add set -g default-terminal "screen-256color" in my .tmux.conf file but the problem still exists. * my terminal screen in tmux: ![Terminal screen in tmux](https://i.sstatic.net/Dx97I.png) * vim run directly on the terminal: ![vim run directly on the terminal](https://i.sstatic.net/voz1l.png) * vim run within tmux: ![vim run within tmux](https://i.sstatic.net/UDNPr.png) The output of echo $TERM; tput colors; tput longname * outside tmux:
xterm-256color
256
xterm
* with 256 colors inside tmux:
screen-256color
256
GUN Screen with 256 colors
Asked by Dyckia (101 rep)
May 24, 2018, 09:59 PM
Last activity: Jul 6, 2025, 03:05 AM