You are not logged in.

#1 2006-11-27 19:51:20

Borosai
Member
From: Sandy Appendix, U.S.A.
Registered: 2006-06-15
Posts: 227

Vim + Zenburn [SOLVED]

I downloaded the latest release of the Zenburn color scheme for Vim, hoping that I could use it in my terminal as well, but it doesn't work...the colors fall back to the default colors. I'm using rxvt-unicode, and I assume it has 256 color support, but I'm not sure. :?

Does anybody else use this combination successfully (urxvt+vim+zenburn)? I'm kind of lost here...  lol

Offline

#2 2006-11-29 16:49:46

test1000
Member
Registered: 2005-04-03
Posts: 834

Re: Vim + Zenburn [SOLVED]

yes, i do. but i had the same prob as you(worked in gvim but not vim) and if i recall correctly it was because one of the config files were overwriting the other or something like that. See if you have a ~/.gvimrc for example, and a ~/.vimrc .. so try deleting/making/changing the config files(maybe in etc too). Sorry i can't be more specific hmm


KISS = "It can scarcely be denied that the supreme goal of all theory is to make the irreducible basic elements as simple and as few as possible without having to surrender the adequate representation of a single datum of experience." - Albert Einstein

Offline

#3 2006-11-29 16:59:09

arooaroo
Member
From: London, UK
Registered: 2005-01-13
Posts: 1,268
Website

Re: Vim + Zenburn [SOLVED]

IIRC, vim reads ~/.vimrc. gvim reads .vimrc and then .gvimrc.

Therefore, make sure your colour scheme config is in .vimrc and it should then work for vim and gvim.

Offline

#4 2006-11-30 01:53:45

codemac
Member
From: Cliche Tech Place
Registered: 2005-05-13
Posts: 786
Website

Re: Vim + Zenburn [SOLVED]

If gvim reads .vimrc then .gvimrc, then the color setting in .gvimrc over rides the one in .vimrc.

Offline

#5 2006-11-30 06:40:50

Borosai
Member
From: Sandy Appendix, U.S.A.
Registered: 2006-06-15
Posts: 227

Re: Vim + Zenburn [SOLVED]

I have both ~/.vimrc and ~/.gvimrc set to zenburn. When I make changes to the .vimrc file with other colors, such as desert256, it works fine. And gvim accepts the scheme perfectly. So, the files seem ok.

Any other ideas....maybe something I can test? For now, I will take a look at the system-wide config...maybe something in there needs changing. Blah, who knows. big_smile

Offline

#6 2006-11-30 06:50:52

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Vim + Zenburn [SOLVED]

it's always possible zenburn just fails in non-gui mode.  This is typical alot of the time.  Check the color definition and see if it sets ctermfg and ctermbg.

Offline

#7 2006-11-30 21:04:10

Borosai
Member
From: Sandy Appendix, U.S.A.
Registered: 2006-06-15
Posts: 227

Re: Vim + Zenburn [SOLVED]

Here is the zenburn.vim file...others with more experience can find any problems much better than I can.

" Vim color file
" Maintainer:   Jani Nurminen <jani>
" Last Change:  $Id: zenburn.vim,v 1.15 2006/09/07 15:57:46 jnurmine Exp $
" URL:          http://slinky.imukuppi.org/zenburn/
" License:      GPL
"
" Nothing too fancy, just some alien fruit salad to keep you in the zone.
" This syntax file was designed to be used with dark environments and 
" low light situations. Of course, if it works during a daybright office, go
" ahead :)
"
" Owes heavily to other Vim color files! With special mentions
" to "BlackDust", "Camo" and "Desert".
"
" To install, copy to ~/.vim/colors directory. Then :colorscheme zenburn.  
" See also :help syntax
"
" Credits:
"  - Jani Nurminen - original Zenburn
"  - Steve Hall & Cream posse - higher-contrast Visual selection
"  - Kurt Maier - 256 color console coloring, low and high contrast toggle,
"                 bug fixing
"
" CONFIGURABLE PARAMETERS:
" 
" You can use the default (don't set any parameters), or you can
" set some parameters to tweak the Zenburn colours.
"
" * You can now set a darker background for bright environments. To activate, use:
"   contrast Zenburn, use:
"
"      let g:zenburn_high_Contrast = 1
"
" * To get more contrast to the Visual selection, use
"   
"      let g:zenburn_alternate_Visual = 1
" 
" * To use alternate colouring for Error message, use
"     
"      let g:zenburn_alternate_Error = 1
"
" * The new default for Include is a duller orange. To use the original
"   colouring for Include, use
"     
"      let g:zenburn_alternate_Include = 1
"
" * To turn the parameter(s) back to defaults, use UNLET:
"
"      unlet g:zenburn_alternate_Include
"
"   Setting to 0 won't work!
"
" That's it, enjoy!
" 
" TODO
"   - Visual alternate color is broken? Try GVim >= 7.0.66 if you have trouble
"   - IME colouring (CursorIM)
"   - obscure syntax groups: check and colourize
"   - add more groups if necessary

set background=dark
hi clear          
if exists("syntax_on")
    syntax reset
endif
let g:colors_name="zenburn"

hi Boolean         guifg=#dca3a3
hi Character       guifg=#dca3a3 gui=bold
hi Comment         guifg=#7f9f7f gui=italic
hi Conditional     guifg=#f0dfaf gui=bold
hi Constant        guifg=#dca3a3 gui=bold
hi Cursor          guifg=#000d18 guibg=#8faf9f gui=bold
hi Debug           guifg=#bca3a3 gui=bold
hi Define          guifg=#ffcfaf gui=bold
hi Delimiter       guifg=#8f8f8f
hi DiffAdd         guifg=#709080 guibg=#313c36 gui=bold
hi DiffChange      guibg=#333333
hi DiffDelete      guifg=#333333 guibg=#464646
hi DiffText        guifg=#ecbcbc guibg=#41363c gui=bold
hi Directory       guifg=#dcdccc gui=bold
hi ErrorMsg        guifg=#80d4aa guibg=#2f2f2f gui=bold
hi Exception       guifg=#c3bf9f gui=bold
hi Float           guifg=#c0bed1
hi FoldColumn      guifg=#93b3a3 guibg=#3f4040
hi Folded          guifg=#93b3a3 guibg=#3f4040
hi Function        guifg=#efef8f
hi Identifier      guifg=#efdcbc
hi IncSearch       guibg=#f8f893 guifg=#385f38
hi Keyword         guifg=#f0dfaf gui=bold
hi Label           guifg=#dfcfaf gui=underline
hi LineNr          guifg=#9fafaf guibg=#262626
hi Macro           guifg=#ffcfaf gui=bold
hi ModeMsg         guifg=#ffcfaf gui=none
hi MoreMsg         guifg=#ffffff gui=bold
hi NonText         guifg=#404040
hi Number          guifg=#8cd0d3
hi Operator        guifg=#f0efd0
hi PreCondit       guifg=#dfaf8f gui=bold
hi PreProc         guifg=#ffcfaf gui=bold
hi Question        guifg=#ffffff gui=bold
hi Repeat          guifg=#ffd7a7 gui=bold
hi Search          guifg=#ffffe0 guibg=#284f28
hi SpecialChar     guifg=#dca3a3 gui=bold
hi SpecialComment  guifg=#82a282 gui=bold
hi Special         guifg=#cfbfaf
hi SpecialKey      guifg=#9ece9e
hi Statement       guifg=#e3ceab gui=none
hi StatusLine      guifg=#2e4340 guibg=#ccdc90
hi StatusLineNC    guifg=#2e3330 guibg=#88b090
hi StorageClass    guifg=#c3bf9f gui=bold
hi String          guifg=#cc9393
hi Structure       guifg=#efefaf gui=bold
hi Tag             guifg=#e89393 gui=bold
hi Title           guifg=#efefef gui=bold
hi Todo            guifg=#dfdfdf guibg=bg gui=bold
hi Typedef         guifg=#dfe4cf gui=bold
hi Type            guifg=#dfdfbf gui=bold
hi Underlined      guifg=#dcdccc gui=underline
hi VertSplit       guifg=#303030 guibg=#688060
hi VisualNOS       guifg=#333333 guibg=#f18c96 gui=bold,underline
hi WarningMsg      guifg=#ffffff guibg=#333333 gui=bold
hi WildMenu        guibg=#2c302d guifg=#cbecd0 gui=underline

" Entering Kurt zone
if &t_Co > 255
    hi Boolean         ctermfg=181  
    hi Character       ctermfg=181   cterm=bold
    hi Comment         ctermfg=108   
    hi Conditional     ctermfg=223   cterm=bold
    hi Constant        ctermfg=181   cterm=bold
    hi Cursor          ctermfg=233   ctermbg=109     cterm=bold
    hi Debug           ctermfg=181   cterm=bold
    hi Define          ctermfg=223   cterm=bold
    hi Delimiter       ctermfg=245  
    hi DiffAdd         ctermfg=66    ctermbg=237     cterm=bold
    hi DiffChange      ctermbg=236  
    hi DiffDelete      ctermfg=236   ctermbg=238    
    hi DiffText        ctermfg=217   ctermbg=237     cterm=bold
    hi Directory       ctermfg=188   cterm=bold
    hi ErrorMsg        ctermfg=115   ctermbg=236     cterm=bold
    hi Exception       ctermfg=249   cterm=bold
    hi Float           ctermfg=251  
    hi FoldColumn      ctermfg=109   ctermbg=238    
    hi Folded          ctermfg=109   ctermbg=238    
    hi Function        ctermfg=228  
    hi Identifier      ctermfg=223  
    hi IncSearch       ctermbg=228   ctermfg=238    
    hi Keyword         ctermfg=223   cterm=bold
    hi Label           ctermfg=187   cterm=underline
    hi LineNr          ctermfg=248   ctermbg=235    
    hi Macro           ctermfg=223   cterm=bold
    hi ModeMsg         ctermfg=223   cterm=none
    hi MoreMsg         ctermfg=15    cterm=bold
    hi NonText         ctermfg=238  
    hi Number          ctermfg=116  
    hi Operator        ctermfg=230  
    hi PreCondit       ctermfg=180   cterm=bold
    hi PreProc         ctermfg=223   cterm=bold
    hi Question        ctermfg=15    cterm=bold
    hi Repeat          ctermfg=223   cterm=bold
    hi Search          ctermfg=230   ctermbg=236    
    hi SpecialChar     ctermfg=181   cterm=bold
    hi SpecialComment  ctermfg=108   cterm=bold
    hi Special         ctermfg=181  
    hi SpecialKey      ctermfg=151  
    hi Statement       ctermfg=187   ctermbg=234     cterm=none
    hi StatusLine      ctermfg=237   ctermbg=186    
    hi StatusLineNC    ctermfg=236   ctermbg=108    
    hi StorageClass    ctermfg=249   cterm=bold
    hi String          ctermfg=174  
    hi Structure       ctermfg=229   cterm=bold
    hi Tag             ctermfg=181   cterm=bold
    hi Title           ctermfg=7     ctermbg=234     cterm=bold
    hi Todo            ctermfg=108   ctermbg=234     cterm=bold
    hi Typedef         ctermfg=253   cterm=bold
    hi Type            ctermfg=187   cterm=bold
    hi Underlined      ctermfg=188   ctermbg=234     cterm=bold
    hi VertSplit       ctermfg=236   ctermbg=65 
    hi VisualNOS       ctermfg=236   ctermbg=210     cterm=bold
    hi WarningMsg      ctermfg=15    ctermbg=236     cterm=bold
    hi WildMenu        ctermbg=236   ctermfg=194     cterm=bold
    if exists("g:zenburn_high_Contrast")
        hi Normal ctermfg=188 ctermbg=234
    else
        hi Normal ctermfg=188 ctermbg=237
        hi Cursor          ctermbg=109
        hi diffadd         ctermbg=237
        hi diffdelete      ctermbg=238
        hi difftext        ctermbg=237
        hi errormsg        ctermbg=237
        hi foldcolumn      ctermbg=238
        hi folded          ctermbg=238
        hi incsearch       ctermbg=228
        hi linenr          ctermbg=238  
        hi search          ctermbg=238
        hi statement       ctermbg=237
        hi statusline      ctermbg=144
        hi statuslinenc    ctermbg=108
        hi title           ctermbg=237
        hi todo            ctermbg=237
        hi underlined      ctermbg=237
        hi vertsplit       ctermbg=65 
        hi visualnos       ctermbg=210
        hi warningmsg      ctermbg=236
        hi wildmenu        ctermbg=236
    endif
endif


if exists("g:zenburn_high_Contrast")
    " use new darker background
    hi Normal          guifg=#dcdccc guibg=#1f1f1f
else
    " Original, lighter background
    hi Normal          guifg=#dcdccc guibg=#3f3f3f
endif

if exists("g:zenburn_alternate_Visual")
    " Visual with more contrast, thanks to Steve Hall & Cream posse
    " gui=none fixes weird highlight problem in at least GVim 7.0.66, thanks to Kurt Maier
    hi Visual          guifg=#000000 guibg=#71d3b4 gui=none
    hi VisualNOS       guifg=#000000 guibg=#71d3b4 gui=none
else
    " use default visual
    hi Visual          guifg=#233323 guibg=#71d3b4 gui=none
    hi VisualNOS       guifg=#233323 guibg=#71d3b4 gui=none
endif

if exists("g:zenburn_alternate_Error")
    " use a bit different Error
    hi Error           guifg=#ef9f9f guibg=#201010 gui=bold  
else
    " default
    hi Error           guifg=#e37170 guibg=#332323 gui=none
endif

if exists("g:zenburn_alternate_Include")
    " original setting
    hi Include         guifg=#ffcfaf gui=bold
else
    " new, less contrasted one
    hi Include         guifg=#dfaf8f gui=bold
endif
    " TODO check every syntax group that they're ok

Offline

#8 2006-11-30 21:17:09

arooaroo
Member
From: London, UK
Registered: 2005-01-13
Posts: 1,268
Website

Re: Vim + Zenburn [SOLVED]

I've just tried playing around. Zenburn is written for gvim. You can see that with the guifg/guibg commands.

As you can see, Kurt adding cterm* commands for consoles like xterm which support 256 colours. However, it seems that consoles behave differently (I'm using konsole which requires its own schema file to work properly with vim+zenburn). I don't really know what to advise.

Just use desert for now!

Offline

#9 2006-11-30 21:20:08

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Vim + Zenburn [SOLVED]

Like I said, you need to check for ctermfg and ctermbg.  These *are* set, however, they are in an "if" block.  You can easilly find out what t_Co is through vim's extensive help, but I will give you a hint.  It is the number of colors a terminal supports.

if &t_Co > 255

urxvt does not support that many colors.  It supports 88.
Thus, zenburn does not work on an 88 color terminal.

Both desert256 and inkpot should work fine under 88 color terminals.  The best you can hope for is to contact the author and ask them to provide an entry for 88 color terminals too.

Offline

#10 2006-12-01 09:21:28

Borosai
Member
From: Sandy Appendix, U.S.A.
Registered: 2006-06-15
Posts: 227

Re: Vim + Zenburn [SOLVED]

See, I wouldn't have figured that out anytime soon...thanks for clearing it up. I guess I will use something else for now. Or I can use another terminal. Whatever, it isn't all that important. big_smile

Offline

#11 2006-12-01 15:57:24

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Vim + Zenburn [SOLVED]

Borosai wrote:

See, I wouldn't have figured that out anytime soon...thanks for clearing it up. I guess I will use something else for now. Or I can use another terminal. Whatever, it isn't all that important. big_smile

I actually like inkpot in urxvt.  It works nicely

Offline

#12 2006-12-01 22:11:23

Borosai
Member
From: Sandy Appendix, U.S.A.
Registered: 2006-06-15
Posts: 227

Re: Vim + Zenburn [SOLVED]

phrakture wrote:

I actually like inkpot in urxvt.  It works nicely

I gave it a spin, but I just don't like that much orange  tongue  Thanks though.

Offline

Board footer

Powered by FluxBB