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
: 
* vim
run directly on the terminal: 
* vim
run within tmux
: 
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
Last activity: Jul 6, 2025, 03:05 AM