You are not logged in.

#1 2011-06-06 06:42:53

instinct
Member
Registered: 2011-04-13
Posts: 14

[Solved]vim colorschemes not working

Vim colorschemes are not working.When I set a colorscheme with ":color name" colors change just a bit but it don't get nothing even near the theme preview.
I'm using rxvt with zsh.I already tested urxvt colors with a perl script,they're working fine.
Sorry for my bad english and for being such a fucking newbie.
: )

Last edited by instinct (2013-03-13 21:17:32)

Offline

#2 2011-06-06 07:08:19

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Solved]vim colorschemes not working

What happens if you switch from light theme to a dark one? Almost no changes at all?
Try with a fresh vim config.

Offline

#3 2011-06-06 11:03:07

Drexya
Member
Registered: 2009-07-28
Posts: 23

Re: [Solved]vim colorschemes not working

And il you use 256 colorschemes, try that in your vim config file:

set t_Co=256

Last edited by Drexya (2011-06-06 11:03:24)


Sorry for my poor english.

Offline

#4 2011-06-06 11:34:51

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: [Solved]vim colorschemes not working

Don't forget that if the theme uses colour 0-15, how it looks will depend on your termcolours.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#5 2011-06-06 17:35:59

instinct
Member
Registered: 2011-04-13
Posts: 14

Re: [Solved]vim colorschemes not working

Don't forget that if the theme uses colour 0-15, how it looks will depend on your termcolours.

Yeah...that's enlighthening. : |
Hum...problem solved then,cuz I really think that my vim themes beeing very uggly due to my tem colors is not an actual problem... : |
Thanks for everybody for the attention and suport!I really apreciate it!
Again,sorry for my bad english.

Offline

#6 2011-06-06 19:05:41

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: [Solved]vim colorschemes not working

You could always try Gvim.

Offline

#7 2011-06-07 04:07:55

instinct
Member
Registered: 2011-04-13
Posts: 14

Re: [Solved]vim colorschemes not working

Yeah,but I was kind of looking for something more terminal oriented...
Is it possible to isolate vim colorscheme from my terminal colorscheme?Or at least is there a hack to do so?
If that's not possible,could you guys recommend some cool rxvt + vim colorschemes that blend well together?
Believe it or not,I'm a programmer and I really enjoy nice syntax highlighting.
Nah...problem not solved... : /

Offline

#8 2011-06-07 06:47:56

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: [Solved]vim colorschemes not working

You are bound to the terminal color capabilities in this case. But you can try a terminal with 256-color capabilities (urxvt should work in this mode, at least my rxvt-unicode from extra does so) which provides a much larger color adaption range.

And keep in mind that most vim color schemes are designed for GVIM  nowadays which do not easily scale to terminal colors. Search e.g. the VIM scripts for "256 color terminal" in the "color scheme" type.

Last edited by bernarcher (2011-06-07 06:52:09)


To know or not to know ...
... the questions remain forever.

Offline

#9 2011-06-07 10:50:05

roygbiv
Member
Registered: 2011-05-18
Posts: 204

Re: [Solved]vim colorschemes not working

I recommend firstly to define all your terminal colors in your ~/.Xdefaults accordingly. Here's a sample from my own ~/.Xdefaults - I'm using urxvt terminal with standard terminal colors:

URxvt.background: rgb:00/00/00
URxvt.foreground: rgb:c2/c2/c2

*color0: rgb:00/00/00
*color1: rgb:a8/00/00
*color2: rgb:00/a8/00
*color3: rgb:a8/54/00
*color4: rgb:00/00/a8
*color5: rgb:a8/00/a8
*color6: rgb:00/a8/a8
*color7: rgb:42/42/42
*color8: rgb:00/00/00
*color9: rgb:f8/54/50
*color10: rgb:50/fc/50
*color11: rgb:f8/fc/50
*color12: rgb:50/54/f8
*color13: rgb:f8/54/f8
*color14: rgb:50/fc/f8
*color15: rgb:f8/fc/f8

You can test your terminal colors with a color script found here.
After that you should set up vim. Start with ~/.vimrc and ~/.vim/colors/yourcolor_scheme.vim.

In ~/.vimrc you should have

set t_Co=256
syntax on

And then you can find yourself a colorscheme that fits you. Now here's the tricky part: the colors in here are defined for terminals (cterm colors) and for gvim (gui colors). I find it hard to get the desired colors using cterm colors, so I am using a script that converts guicolors to the equivalent terminal colors - its called guicolorscheme. After you download the script, put it in ~/.vim/plugin, and add this to the bottom of your ~/.vimrc:

if (&t_Co == 256 || &t_Co == 88) && !has('gui_running') &&
  \ filereadable(expand("$HOME/.vim/plugin/guicolorscheme.vim"))

" Use the guicolorscheme plugin to makes 256-color or 88-color
" terminal use GUI colors rather than cterm colors.

  runtime! plugin/guicolorscheme.vim
  GuiColorScheme hax
else

" For 8-color 16-color terminals or for gvim, just use the
" regular :colorscheme command.

 colorscheme default
endif

I have thinkered with my own colorscheme here to get some nice colors, so you are free to use that one, and remember to put it in ~/.vim/colors/.

Last edited by roygbiv (2011-06-07 10:53:06)

Offline

#10 2011-06-09 03:49:25

instinct
Member
Registered: 2011-04-13
Posts: 14

Re: [Solved]vim colorschemes not working

Hum...after reading the comments and searching a bit I guess I'll have to stay with gvim.That's no problem at all,it's just a little bit more uncomfortable then vim.
Thank you guys for your amazing support!
Problem solved.

Offline

#11 2011-06-09 08:25:38

roygbiv
Member
Registered: 2011-05-18
Posts: 204

Re: [Solved]vim colorschemes not working

instinct wrote:

Hum...after reading the comments and searching a bit I guess I'll have to stay with gvim.That's no problem at all,it's just a little bit more uncomfortable then vim.

Then why not use vim?

Problem solved.

Then please edit your post title with [SOLVED]. Cheers

Offline

Board footer

Powered by FluxBB