-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Colors are off when running Vim via SSH inside tmux. #4
Comments
I cannot reproduce that, at least using Vim (I don't have NeoVim in the Ubuntu box I'm connecting to). My Vim configuration is like yours. It sounds like a tmux problem. This is the terminal configuration in my
(I set the terminal to |
This is a comment from my personal dotfiles repository, when I introduced the lines above:
|
Thanks for the help. Unfortunately adding the two lines (with |
From ncurses.
They give me italics in terminal (also in Terminal.app). |
Ah, in Ubuntu you should put |
Btw, I'm using tmux 2.1, if that matters. |
I managed to upgrade to Tmux 2.4 (prerelease I guess?) but I can't easily upgrade ncurses-base to get that |
This is the content of my
|
I upgraded to Ubuntu LTS 16.04 and downgraded tmux to 2.1 and now it kinda works (using It's like that even if I comment those few I prefer the green-ish background. Oh and thanks for your |
No, the color palette is from the original Solarized.
You may try raising an issue at the tmux repository. I am afraid I have run out of ideas :( |
I might do that. Thanks anyway for your help! |
FWIW I have the same issue |
Reopening, because I can now reproduce the issue. Let me summarise the problem: the issue here is that Vim colors do not look right when
Besides, your local terminal does support true colors (e.g., iTerm2). The local terminal color palette should not matter. Finally, if you run Vim outside tmux, colors do look fine. What I have found is that there seems to be a problem with true colors in tmux, which is independent of Vim. To verify that, can you please try the following script both inside and outside tmux? #!/bin/bash
#
# https://gist.github.com/XVilka/8346728
#
awk 'BEGIN{
s="/\\/\\/\\/\\/\\"; s=s s s s s s s s;
for (colnum = 0; colnum<77; colnum++) {
r = 255-(colnum*255/76);
g = (colnum*510/76);
b = (colnum*255/76);
if (g>255) g = 510-g;
printf "\033[48;2;%d;%d;%dm", r,g,b;
printf "\033[38;2;%d;%d;%dm", 255-r,255-g,255-b;
printf "%s\033[0m", substr(s,colnum+1,1);
}
printf "\n";
}' This is what I get outside tmux: And this is what I get inside tmux: The commands are run in the remote box, of course. I am using tmux 2.1 in Ubuntu. |
Yeah, I agree and was having the same problem with that exact script in tmux. I am sorta confused because it... went away after a reboot? For more details, read here: tmux/tmux#993 |
This discussion seems relevant: tmux/tmux#622. If you use NeoVim, could you try what is suggested in vim-one's Readme? |
I have updated tmux to v2.5 and the issue is gone. Feel free to reopen this if you still have problems with the latest tmux. |
I had this issue as well running tmux 3+. Adding the lines suggested in vim one worked for me.
|
Mantri Mall |
I'm using iTerm2 3.0.10 on macOS which connects via SSH to an Ubuntu 14.04 VM running Neovim 0.1.6-dev and Tmux 2.0.
I have the following vim config:
(the
^[
are actual escape sequences)This works pretty well without Tmux, like this:
But as soon as I start nvim inside Tmux, it looks FUCKED. Like this:
My
TERM
isxterm-256color
outside of tmux, andscreen-256color
inside.I've tried pretty much "everything" but no success. Any ideas why?
The text was updated successfully, but these errors were encountered: