You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Steps reproduce:
connect to another machine using mosh
launch a tmux session
open a code file in vim
Result: syntax highlighting is almost completely lost
The same steps with ssh instead of mosh do not change the vim colors in any way.
mosh screenshot:
ssh screenshot:
When using mosh with tmux and vim, I get really random and weird background color shifting. As you can see in the second screenshot for some reason there is weird highlighting in between the json attributes and on the "24"
Inside tmux/mosh and tmux/ssh my $TERM is screen-256color. Over just ssh and mosh the $TERM is xterm-256color. On my local machine $TERM is xterm-256color. So tmux seems to be changing the $TERM but ssh doesn't seem to care while mosh does.
Not sure which is the client and which is the server, but versions of mosh before 1.2 had pedantic/sophisticated colorimetry code that posterized 256-color colors to the perceptually-closest 8-color color for terminals that did not advertise their ability to support 256-color escape sequences (I am not making this up).
In Mosh 1.2, we went to a much simpler approach where we pass through the 256-color escape sequences even if the terminal doesn't advertise support. This is less pedantically correct but in practice produces better results. Glad to hear that upgrading helped.
Activity
berceanu commentedon Oct 4, 2014
here are my configuration files
.Xresources: https://gist.github.com/berceanu/b0f6324c36a86fbe2b28
.tmux.conf: https://gist.github.com/berceanu/8650a0f12353299706bf
.vimrc: https://gist.github.com/berceanu/694089987ab15cf6d35e
eminence commentedon Oct 15, 2014
What happens if you run
:syn onwithin vim? Do the colors then appear?berceanu commentedon Oct 16, 2014
nope. syntax highlighting is on, in fact. if you look carefully at the first pic, there is a difference in color between "module" and "MyModule".
vdrandom commentedon Oct 16, 2014
I think it has something to do with #178 , check you $TERM values locally and after you connect to the remote host.
blittle commentedon Dec 17, 2014
ssh

mosh

When using mosh with tmux and vim, I get really random and weird background color shifting. As you can see in the second screenshot for some reason there is weird highlighting in between the json attributes and on the "24"
Inside tmux/mosh and tmux/ssh my $TERM is
screen-256color. Over just ssh and mosh the $TERM isxterm-256color. On my local machine $TERM isxterm-256color. So tmux seems to be changing the $TERM but ssh doesn't seem to care while mosh does.keithw commentedon Dec 17, 2014
What version of mosh-client are you running on the client, and what version of mosh-server on the server?
blittle commentedon Dec 17, 2014
That probably has something to do with it:
server
and
client
blittle commentedon Dec 17, 2014
@keithw that did it for me things seem to be working when updated my version of mosh on the server, thanks and sorry for the rabbit hole :)
keithw commentedon Dec 17, 2014
Not sure which is the client and which is the server, but versions of mosh before 1.2 had pedantic/sophisticated colorimetry code that posterized 256-color colors to the perceptually-closest 8-color color for terminals that did not advertise their ability to support 256-color escape sequences (I am not making this up).
In Mosh 1.2, we went to a much simpler approach where we pass through the 256-color escape sequences even if the terminal doesn't advertise support. This is less pedantically correct but in practice produces better results. Glad to hear that upgrading helped.
@berceanu, was this also your issue?
cgull commentedon Jun 6, 2015
No response from original reporter. See also #507.