Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Desktop Environments
  • Search

[SOLVED]vim + rxvt-unicode -> no (correct) colorschemes

Problems with GUI applications? Questions about X, KDE, Gnome, Fluxbox, etc.? Come on in. NOTE: For multimedia, go up one forum
Post Reply
Advanced search
15 posts • Page 1 of 1
Author
Message
LoTeK
Apprentice
Apprentice
User avatar
Posts: 270
Joined: Thu Jul 26, 2012 6:57 pm

[SOLVED]vim + rxvt-unicode -> no (correct) colorschemes

  • Quote

Post by LoTeK » Sat Apr 06, 2013 9:41 pm

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: Select all

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/
Last edited by LoTeK on Sat Apr 20, 2013 11:25 pm, edited 2 times in total.
"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!"
Top
Fran
Guru
Guru
User avatar
Posts: 530
Joined: Sun Feb 29, 2004 3:14 pm
Location: Coruña (Spain)

  • Quote

Post by Fran » Sun Apr 07, 2013 10:50 am

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?
Top
LoTeK
Apprentice
Apprentice
User avatar
Posts: 270
Joined: Thu Jul 26, 2012 6:57 pm

  • Quote

Post by LoTeK » Sun Apr 07, 2013 2:04 pm

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.
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!"
Top
Fran
Guru
Guru
User avatar
Posts: 530
Joined: Sun Feb 29, 2004 3:14 pm
Location: Coruña (Spain)

  • Quote

Post by Fran » Sun Apr 07, 2013 7:58 pm

LoTeK wrote:
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.
Does it show all the colors?
yes all colors are shown!
That's weird. Which version do you have? This is mine

Code: Select all

[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...
Top
LoTeK
Apprentice
Apprentice
User avatar
Posts: 270
Joined: Thu Jul 26, 2012 6:57 pm

  • Quote

Post by LoTeK » Sun Apr 07, 2013 8:54 pm

This one:

Code: Select all

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!"
Top
Fran
Guru
Guru
User avatar
Posts: 530
Joined: Sun Feb 29, 2004 3:14 pm
Location: Coruña (Spain)

  • Quote

Post by Fran » Mon Apr 08, 2013 7:56 am

LoTeK wrote:This one:

Code: Select all

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 :P)
Top
LoTeK
Apprentice
Apprentice
User avatar
Posts: 270
Joined: Thu Jul 26, 2012 6:57 pm

  • Quote

Post by LoTeK » Tue Apr 09, 2013 7:35 am

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!"
Top
Fran
Guru
Guru
User avatar
Posts: 530
Joined: Sun Feb 29, 2004 3:14 pm
Location: Coruña (Spain)

  • Quote

Post by Fran » Tue Apr 09, 2013 7:54 am

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.
Top
LoTeK
Apprentice
Apprentice
User avatar
Posts: 270
Joined: Thu Jul 26, 2012 6:57 pm

  • Quote

Post by LoTeK » Tue Apr 09, 2013 7:23 pm

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!"
Top
Fran
Guru
Guru
User avatar
Posts: 530
Joined: Sun Feb 29, 2004 3:14 pm
Location: Coruña (Spain)

  • Quote

Post by Fran » Tue Apr 09, 2013 7:32 pm

I don't know about the other two, but inkpot looks correct. Pink rocks :)

BTW, you have the worst background ever :P
Top
LoTeK
Apprentice
Apprentice
User avatar
Posts: 270
Joined: Thu Jul 26, 2012 6:57 pm

  • Quote

Post by LoTeK » Tue Apr 09, 2013 7:52 pm

I don't know about the other two, but inkpot looks correct. Pink rocks :)
ok, then I leave it at that for the moment.
BTW, you have the worst background ever :P
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!"
Top
stelth
n00b
n00b
User avatar
Posts: 45
Joined: Thu May 25, 2006 2:06 pm

  • Quote

Post by stelth » Tue Apr 09, 2013 8:36 pm

Your .Xresources is set up wrong for solarized. For solarized to work the way it's supposed to, use https://github.com/solarized/xresources ... /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
And on the 3rd day, God created the Remington bolt-action rifle; so that man could fight the dinosaurs and the homosexuals. AMEN.
Top
khayyam
Watchman
Watchman
User avatar
Posts: 6227
Joined: Thu Jun 07, 2012 2:45 am
Location: Room 101

  • Quote

Post by khayyam » Sat Apr 20, 2013 1:38 am

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: Select all

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: Select all

    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
Top
LoTeK
Apprentice
Apprentice
User avatar
Posts: 270
Joined: Thu Jul 26, 2012 6:57 pm

  • Quote

Post by LoTeK » Sat Apr 20, 2013 11:24 pm

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!"
Top
khayyam
Watchman
Watchman
User avatar
Posts: 6227
Joined: Thu Jun 07, 2012 2:45 am
Location: Room 101

  • Quote

Post by khayyam » Sun Apr 21, 2013 1:08 am

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: Select all

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
Top
Post Reply

15 posts • Page 1 of 1

Return to “Desktop Environments”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic