Vim colors inside a tmux session
I tried several ways which returned by Google, but don’t get what I expected.
Vim colors inside a tmux session
I tried several ways which returned by Google, but don’t get what I expected.
Here are couple outcomes I infered after all
- No, you can’t get same colors in vim inside/outside of tmux with
xterm-256color. - Vim with
xterm-256coloroutside of tmux is the best. Second prize and very close to the champion is Vim withscreen-256color, still feel differences, but not much. - Vim with
screen-256colorinside or outside of tmux are the same or almost the same. Sometimes I think I found a difference, but then sometimes not. Not 100% sure. - The best choice to have both Vim and Tmux is
export TERM=screen-256color
In .tmux.conf
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
set -g default-terminal 'screen-256color'
You will need to make sure that your terminal application supports truecolor.
Check it by
$ echo $COLORTERM
truecolor
:wq
메타데이터
- post_id
- 6cfc5a53cd66
- slug
- vim-colors-inside-a-tmux-session-6cfc5a53cd66
- url
- https://medium.com/@xuta/vim-colors-inside-a-tmux-session-6cfc5a53cd66
- canonical_url
- https://medium.com/@xuta/vim-colors-inside-a-tmux-session-6cfc5a53cd66
- author_url
- https://medium.com/@xuta
- status
- ok
- fetched_at
- 2026-07-29 05:38:16