0

How can I use vim (8.2) within a tmux session in iTerm2, with Solarized colors? I have the Solarized colors set with my terminal, as suggested in the docs for vim solarized colors plugin. When I call Vim from within a tmux session, the colors are clearly different, as below - in particular there's a jarring change in the background color in some places. How can I specify that the appearance is the same, regardless of whether I'm running from within a tmux session?

Note that I do not want to use a 256 color palette.

Normal vim session

normal

When running from within tmux

tmux

1

Try adding to ~/.tmux.conf:

set -g default-terminal "tmux-256color"
set -ag terminal-overrides ',*:RGB'
# for older tmux
# set -ag terminal-overrides ',*:Tc'

Might be interesting:

1
  • This seems to work. A note to any other newcomers to tmux (from screen). Your settings will not be reloaded from ~/.tmux.conf if you have any other currently running sessions. Apr 10 at 11:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.