View previous topic :: View next topic |
Author |
Message |
LoTeK Apprentice
Joined: 26 Jul 2012 Posts: 270
|
Posted: Sat Apr 06, 2013 9:41 pm Post subject: [SOLVED]vim + rxvt-unicode -> no (correct) colorschemes |
|
|
hi,
I've compiled rxvt-unicode with the 256-use flag and I've tried several things like setting the name of my terminal in .Xresources to rxvt-256color and of course I've tried all the "guicolorscheme.vim" / "CSApprox.vim" plugins but the colorthemes don't work.
the "GuiColorScheme" command is recognized in vim, and I've set t_Co=256.
my .vimrc:
Code: | set t_Co=256
set cindent
set autowrite
set mouse=a
set ruler
set nu
syntax on
set tabstop=3
set shiftwidth=3
set smarttab
set autoindent
set nocompatible
set expandtab
if (&t_Co == 256) && filereadable (expand ("$HOME/.vim/plugin/guicolorscheme.vim"))
runtime! plugin/guicolorscheme.vim
GuiColorScheme darkrobot
endif
|
my .Xresources:
http://bpaste.net/show/89484/ _________________ "I want to see gamma rays! I want to hear X-rays! Do you see the absurdity of what I am? I can't even express these things properly because I have to conceptualize complex ideas in this stupid limiting spoken language!"
Last edited by LoTeK on Sat Apr 20, 2013 11:25 pm; edited 2 times in total |
|
Back to top |
|
|
Fran Guru
Joined: 29 Feb 2004 Posts: 530 Location: Coruña (Spain)
|
Posted: Sun Apr 07, 2013 10:50 am Post subject: |
|
|
Why set your name in .Xresources? In my urxvt echo $TERM defaults to rxvt-unicode-256color. In .vimrc I just add "colorscheme inkpot" and just works (tm), no need to set t_Co.
Run this:
http://www.frexx.de/xterm-256-notes/data/256colors2.pl
Does it show all the colors? |
|
Back to top |
|
|
LoTeK Apprentice
Joined: 26 Jul 2012 Posts: 270
|
Posted: Sun Apr 07, 2013 2:04 pm Post subject: |
|
|
Quote: | Why set your name in .Xresources? |
I've just tried it this way. Before that I had no name at all. My default echo $TERM is rxvt-unicode without the 256-colors.
Quote: | Does it show all the colors? |
yes all colors are shown! _________________ "I want to see gamma rays! I want to hear X-rays! Do you see the absurdity of what I am? I can't even express these things properly because I have to conceptualize complex ideas in this stupid limiting spoken language!" |
|
Back to top |
|
|
Fran Guru
Joined: 29 Feb 2004 Posts: 530 Location: Coruña (Spain)
|
Posted: Sun Apr 07, 2013 7:58 pm Post subject: |
|
|
LoTeK wrote: | Quote: | Why set your name in .Xresources? |
I've just tried it this way. Before that I had no name at all. My default echo $TERM is rxvt-unicode without the 256-colors.
Quote: | Does it show all the colors? |
yes all colors are shown! |
That's weird. Which version do you have? This is mine
Code: | [ebuild R ] x11-terms/rxvt-unicode-9.17 USE="256-color focused-urgency font-styles mousewheel perl startup-notification vanilla xft -alt-font-width -blink -buffer-on-clear -fading-colors -iso14755 -pixbuf -secondary-wheel -unicode3 -wcwidth" 878 kB |
and default TERM is rxvt-unicode-256color... |
|
Back to top |
|
|
LoTeK Apprentice
Joined: 26 Jul 2012 Posts: 270
|
Posted: Sun Apr 07, 2013 8:54 pm Post subject: |
|
|
This one: Code: | x11-terms/rxvt-unicode-9.16 was built with the following:
USE="256-color blink fading-colors focused-urgency font-styles iso14755 mousewheel (multilib) perl pixbuf vanilla xft -alt-font-width -buffer-on-clear -secondary-wheel -startup-notification -unicode3 -wcwidth" ABI_X86="64" |
I've removed the name setting in my .Xresources and now default TERM is rxvt-unicode-256color too, but the colorscheme are still not correct... strange...
btw what command did you use for that information? (I've used emerge --info rxvt-unicode) _________________ "I want to see gamma rays! I want to hear X-rays! Do you see the absurdity of what I am? I can't even express these things properly because I have to conceptualize complex ideas in this stupid limiting spoken language!" |
|
Back to top |
|
|
Fran Guru
Joined: 29 Feb 2004 Posts: 530 Location: Coruña (Spain)
|
Posted: Mon Apr 08, 2013 7:56 am Post subject: |
|
|
LoTeK wrote: | This one: Code: | x11-terms/rxvt-unicode-9.16 was built with the following:
USE="256-color blink fading-colors focused-urgency font-styles iso14755 mousewheel (multilib) perl pixbuf vanilla xft -alt-font-width -buffer-on-clear -secondary-wheel -startup-notification -unicode3 -wcwidth" ABI_X86="64" |
I've removed the name setting in my .Xresources and now default TERM is rxvt-unicode-256color too, but the colorscheme are still not correct... strange... |
Remove .vimrc and try putting ":colorscheme default" and ":colorscheme <whatever>" in vim. Try with different 256-color colorschemes (like inkpot).
LoTeK wrote: | btw what command did you use for that information? (I've used emerge --info rxvt-unicode) |
emerge -pv rxvt-unicode (too lazy, I know ) |
|
Back to top |
|
|
LoTeK Apprentice
Joined: 26 Jul 2012 Posts: 270
|
Posted: Tue Apr 09, 2013 7:35 am Post subject: |
|
|
I don't know how to post a screenshot but I think inkpot is correct and moreover a nice theme, thanks
But solarized (which is very practical for coding) is still very wrong, codeschool too. But at least for the moment I'm half satisfied... _________________ "I want to see gamma rays! I want to hear X-rays! Do you see the absurdity of what I am? I can't even express these things properly because I have to conceptualize complex ideas in this stupid limiting spoken language!" |
|
Back to top |
|
|
Fran Guru
Joined: 29 Feb 2004 Posts: 530 Location: Coruña (Spain)
|
Posted: Tue Apr 09, 2013 7:54 am Post subject: |
|
|
LoTeK wrote: | I don't know how to post a screenshot but I think inkpot is correct and moreover a nice theme, thanks
But solarized (which is very practical for coding) is still very wrong, codeschool too. But at least for the moment I'm half satisfied... |
Well, that's weird. I can't help you with that. Maybe those themes use the sixteen colors defined in .Xresources instead of #rrggbb and look different because of that? It would be retarded, but who knows...
OT1: post images in omploader (nice site created by a now-retired gentoo dev) and link them here. Forums don't allow embedding images though.
OT2: ugh, I can't stand solarize. Too much contrast compromise due to that weird "must look good in light and dark backgrounds without changing colors" rule. You end up with something with very low contrast in both cases. |
|
Back to top |
|
|
LoTeK Apprentice
Joined: 26 Jul 2012 Posts: 270
|
Posted: Tue Apr 09, 2013 7:23 pm Post subject: |
|
|
sorry for the weird screenshot (I've used scrot -m but the picture shows all my 3 monitors in one picture): screenshot
left is inkpot, then codeschool, then solarized (with set background=dark)
At first sight I found solarized pretty ugly too, but suddenly I began to appreciate it. I find it quite practiacal but I also can understand when somebody doesn't like it (I only use the dark version). My "solarized" is pretty cool now, although I want the normal one too.
btw I hate it that inkpot shows so many C-keywords in pink _________________ "I want to see gamma rays! I want to hear X-rays! Do you see the absurdity of what I am? I can't even express these things properly because I have to conceptualize complex ideas in this stupid limiting spoken language!" |
|
Back to top |
|
|
Fran Guru
Joined: 29 Feb 2004 Posts: 530 Location: Coruña (Spain)
|
Posted: Tue Apr 09, 2013 7:32 pm Post subject: |
|
|
I don't know about the other two, but inkpot looks correct. Pink rocks
BTW, you have the worst background ever |
|
Back to top |
|
|
LoTeK Apprentice
Joined: 26 Jul 2012 Posts: 270
|
Posted: Tue Apr 09, 2013 7:52 pm Post subject: |
|
|
Quote: | I don't know about the other two, but inkpot looks correct. Pink rocks |
ok, then I leave it at that for the moment.
Quote: | BTW, you have the worst background ever |
haha, thats not my background! it's just because there is one virtual 4520x1920 screen but with 3 different monitors, so this weird twinkle is the part that I don't see.. _________________ "I want to see gamma rays! I want to hear X-rays! Do you see the absurdity of what I am? I can't even express these things properly because I have to conceptualize complex ideas in this stupid limiting spoken language!" |
|
Back to top |
|
|
stelth n00b
Joined: 25 May 2006 Posts: 45
|
Posted: Tue Apr 09, 2013 8:36 pm Post subject: |
|
|
Your .Xresources is set up wrong for solarized. For solarized to work the way it's supposed to, use https://github.com/solarized/xresources/blob/master/solarized for your .Xresources colors. Note, this screws up everything else that isn't solarized color schemed.
I use solarized everywhere, and it didn't look right until I grabbed the necessary parts for .Xresources _________________
Quote: | And on the 3rd day, God created the Remington bolt-action rifle; so that man could fight the dinosaurs and the homosexuals. AMEN. |
|
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Sat Apr 20, 2013 1:38 am Post subject: |
|
|
LoTek ...
To follow on from what stelth has said, you probably don't want to 'set t_Co=256' as its not the number colors thats important. To get a solarized colorscheme, you will need to use the solarized Xresouces, if you don't, solarized can try and reproduce the palette using 256 colours, but this palette is degraded. The reason is that its not about the number of colours available but how the colours are placed in relation to each other (so the palette, not the spectra of available colours), the default number of colours with solarized is 16 :)
With the solarised palette in .Xresources you should get a proper solarized colourscheme with the following:
Code: | if &t_Co > 8
let g:solarized_termcolors=16
set background=dark
colorscheme solarized
endif |
If you don't use a solarized palette in .Xresources then you can use the degraded 256 colour scheme like so:
Code: | let g:solarized_termcolors=256
set background=dark
colorscheme solarized |
From the muddy brown background in the above screenshot I think this is probably what is being set currently (probably due to Co=256) ... the colour seperation seems to be mostly lost.
best ... khay |
|
Back to top |
|
|
LoTeK Apprentice
Joined: 26 Jul 2012 Posts: 270
|
Posted: Sat Apr 20, 2013 11:24 pm Post subject: |
|
|
Thanks I've configured my .Xresources according to the link and my .vimrc according to khayyam's suggestion. Now it works!
Is there no way to use a "normal" .Xresources file and only when you want to work in vim with the solarized colorscheme to switch to the necessary .Xresources configuration? _________________ "I want to see gamma rays! I want to hear X-rays! Do you see the absurdity of what I am? I can't even express these things properly because I have to conceptualize complex ideas in this stupid limiting spoken language!" |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Sun Apr 21, 2013 1:08 am Post subject: |
|
|
LoTeK wrote: | Is there no way to use a "normal" .Xresources file and only when you want to work in vim with the solarized colorscheme to switch to the necessary .Xresources configuration? |
LoTeK ... not that I know of, it would require loading the 'solarised' Xresoures, starting a new terminal with vim, and then doing the same to load the non-solarized (xrdb -load ~/.Xresources etc). I imagine it'd be a bit of a headache. That said you can tweek the .Xresources (I changed some of the solarized definitions slightly) and you can add resources for specific terminals or what have you, eg:
Code: | URxvt.foreground: #eeeee0 |
If something bugs you about solarized then tweek it to your liking. The default forground colour is too dark for my liking.
best ... khay |
|
Back to top |
|
|
|