You are not logged in.

#1 2016-11-23 19:58:08

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Color palette confusion: gvim is right but vim is wrong

Applying the desert theme in vim looks wrong compared to doing it in gvim despite having TERM=xterm-256color in my env.  I am using xfce4-terminal 0.8.1-1.  How can I get the terminal to update its palette to make the them in vim appear correctly?  Is there a better terminal emulator I can use that will automatically set this?  I am not opposed to switching.

Last edited by graysky (2016-11-24 15:05:52)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#2 2016-11-23 20:09:05

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: Color palette confusion: gvim is right but vim is wrong

Offline

#3 2016-11-23 20:21:54

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: Color palette confusion: gvim is right but vim is wrong

Stefan Husmann wrote:

Yes, I did... that was one of the unsolved posts I found.  I believe my xfce4-term is setup correctly:

% echo $TERM
xterm-256color

% tput colors
256

% for ((x=0; x<=255; x++));do echo -e "${x}:\033[48;5;${x}mcolor\033[000m";done
<< outputs the expected fancy colors>>

Last edited by graysky (2016-11-23 20:22:06)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#4 2016-11-24 15:04:48

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: Color palette confusion: gvim is right but vim is wrong

Can someone else verify I am not alone in this?

If you have vim installed just edit the included /usr/share/vim/vim80/colors/desert.vim and set the scheme to that. 

vim /usr/share/vim/vim80/colors/desert.vim
:colorscheme desert

Compare to my screenshot where gvim on the right displays/renders the theme correctly but the terminal vim does not.

Last edited by graysky (2016-11-24 15:05:21)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#5 2016-11-25 22:03:39

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: Color palette confusion: gvim is right but vim is wrong

In xfce4-terminal (which is at defaults) I don't get yellow, so for example "if version > 580" is all orange. Also in place of your purple ("Maintainer:" etc) I see magenta. Otherwise the same.

In urxvt it's pretty much the same as yours except s/purple/magenta again.


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#6 2016-11-25 22:25:05

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: Color palette confusion: gvim is right but vim is wrong

That theme doesn't use 256 colors in the terminal.  The color definitions are right in your screenshot - read them.  Is there any reason you'd even expect these to look the same?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

Board footer

Powered by FluxBB