solarized icon indicating copy to clipboard operation
solarized copied to clipboard

Background Colors over SSH

Open jgallen23 opened this issue 13 years ago • 14 comments

Colors look great when I'm dev'ing locally, but when I hop on my server, the backgrounds look a little off.

jgallen23 avatar May 04 '11 20:05 jgallen23

I'm sure if you worked on MilkMaid some more this problem would resolve itself, Greg.

I see similar results using the dark theme. I loaded the iTerm2 preset into host A, ssh'd into host B with the latest solarized for vim and the background of the terminal and text did not match.

jeffcox avatar May 04 '11 21:05 jeffcox

I'll test and try to reproduce here. @jeffcox / @jgallen23, I'm assuming you have iTerm2 set to xterm-256color? Shouldn't matter, but I want to normalize for my testing.

altercation avatar May 04 '11 21:05 altercation

@altercation - I'm not using iTerm, I'm using OSX Terminal with the solarized color profile

jgallen23 avatar May 04 '11 22:05 jgallen23

@altercation I was not using xterm-256color on iTerm, if it's left at xterm you can reproduce this bug.

jeffcox avatar May 05 '11 14:05 jeffcox

I get a similar problem locally on iTerm2. Looks like this http://cl.ly/1j3e3x0C1a2i3e1L2m1C

TERM=xterm Both vim and iTerm2 are set to solarized light scheme.

matschaffer avatar May 08 '11 01:05 matschaffer

just confirmed that I have the same problem locally and over ssh in iTerm.

In Terminal, locally, it looks fine, but broken over ssh

jgallen23 avatar May 09 '11 22:05 jgallen23

you need to have TERM=xterm-256color in iTerm2

lkraav avatar May 10 '11 22:05 lkraav

Perfect! thanks

On Tue, May 10, 2011 at 6:12 PM, lkraav < [email protected]>wrote:

you need to have TERM=xterm-256color in iTerm2

Reply to this email directly or view it on GitHub: https://github.com/altercation/solarized/issues/107#comment_1133872

matschaffer avatar May 13 '11 01:05 matschaffer

I know this issue is old, but I'm having that problem and I also tried you solution but it says that's an invalid expression. @skylervm

partounian avatar Mar 24 '16 00:03 partounian

@partounian just put it in 3 lines:

if !has('gui_running')
  let g:solarized_termtrans=1
endif

Anyway, this doesn't fix the issue for me.

carlesso avatar Apr 09 '16 21:04 carlesso

I take it back. Solutions works perfectly, just be aware you need to put it before your

colorscheme solarized

carlesso avatar Apr 09 '16 21:04 carlesso

Confirmed, setting g:solarized_termtrans to 1 before 'colorscheme solarized' works! I'd close this issue.

rapha-opensource avatar May 02 '16 19:05 rapha-opensource

If you just want the fix for SSH you can use this:

if $SSH_CONNECTION
    let g:solarized_termtrans=1
endif

However, I would recommend setting the correct TERM variable. That is,

export TERM=xterm-256color

If you are using tmux you need to use screen-256color to prevent this from happening.

nelsyeung avatar Jun 09 '16 15:06 nelsyeung