0
votes

I am having an issue with tmux and vim where the background colors differ, but only when I am ssh'd into another machine. No solutions for posted questions I've found so far have worked for me.

enter image description here

On the left is my local machine, the right is when I'm ssh'd into my devbox. This is one tmux session.

On both machines:

  • TERM is set to "screen-256color"
  • using bash
  • .vimrc contains set term=screen-256color
  • .tmux.conf contains set -g default-terminal "screen-256color"

I'm using Gnome. The background color in tmux when I'm in ssh and just using the cli is normal, this only occurs when I open vim and it returns to the normal color scheme when I exit.

1
If you don't use tmux and just SSH into it, does it look correct? Do you have anything in your ~/.vim/ directory on any of the machines? - ChatterOne
Thank you, I feel so silly for not checking this. It was actually a problem caused by a system .vimrc being sourced, and I've (mostly) fixed it by adding colo default in my own .vimrc. I was tunnel visioned convinced it had to be a tmux issue, since many others have had similar problems. - brenzo

1 Answers

0
votes

I was able to resolve this by using colo default in my .vimrc. I was tunnel visioned convinced it was a tmux issue, and completely forgot vim was sourcing a system .vimrc on the remote box.