color schemes messed up

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

color schemes messed up

Claus Atzenbeck
Hi all,

I started using vimoutliner and I like it. However, apparently it messes
up the color schemes of other (non-otl) documents. I am using vim 7 (not
gvim) in the Terminal on Mac OS X.

For example, when I open ~/.vimrc, vim uses a specific color scheme.
That's fine.  However, when I open the same file *after* opening an .otl
file, .vimrc looks completely different. For example, keywords like
"map" suddenly appear in bold face vimoutliner has been loaded.

I changed the ~/.vim/colors/vo_dark.vim file, because it produced many
bold fonts (which are nowhere defined). Even LineNr changed from normal
font to bold after vimoutliner was loaded.

How can I force vimoutliner only to touch .otl relevant colors, but not
others? Especially the fact that suddenly many bold face fonts appear
makes me wonder, because I don't see any ":hi xxx cterm=bold" defined in
.vim/*.

Thanks for any hint.
Claus
_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: color schemes messed up

Sam Roberts-2
Quoting [hidden email], on Sun, Mar 11, 2007 at 10:32:33AM +0100:
> I started using vimoutliner and I like it. However, apparently it messes
> up the color schemes of other (non-otl) documents. I am using vim 7 (not
> gvim) in the Terminal on Mac OS X.

Me, too, and I had the same problem.

> For example, when I open ~/.vimrc, vim uses a specific color scheme.
> That's fine.  However, when I open the same file *after* opening an .otl
> file, .vimrc looks completely different. For example, keywords like
> "map" suddenly appear in bold face vimoutliner has been loaded.

> I changed the ~/.vim/colors/vo_dark.vim file, because it produced many
> bold fonts (which are nowhere defined). Even LineNr changed from normal
> font to bold after vimoutliner was loaded.

Don't use the vo colorscheme unless you like it. Colorschemes are
global, you probably like yours already.

What you want to do instead is to set the colors used for vo syntax
elements.

Look in ./vim/syntax/vo_base.vim, and you will see what it sets all the
colors to, for light or dark backgrounds. Don't change them there, but
copy either all the definitions, or the ones you want to change into
.vim/after/syntax/vo_base.vim, and set them to be the colors you want.

Here is mine as an example (my xterm's background colour is gray).

To find good colors, I used colortest.vim, but I rearranged it so that
all the greens were together, for example, so I could compare them.
colortest.vim is in your vim lib, but I attach my rearranged one.

================
" ~/.vim/after/syntax/vo_base.vim

hi OL1 ctermfg=darkred
hi OL2 ctermfg=darkred
hi OL3 ctermfg=darkblue
hi OL4 ctermfg=blue
hi OL5 ctermfg=blue
hi OL6 ctermfg=blue
hi OL7 ctermfg=blue
hi OL8 ctermfg=blue
hi OL9 ctermfg=blue

" colors for tags
hi outlTags ctermfg=darkred

" color for tables
hi TA1 ctermfg=darkgray
hi TA2 ctermfg=darkgray
hi TA3 ctermfg=darkgray
hi TA4 ctermfg=darkgray
hi TA5 ctermfg=darkgray
hi TA6 ctermfg=darkgray
hi TA7 ctermfg=darkgray
hi TA8 ctermfg=darkgray
hi TA9 ctermfg=darkgray

" color for user text (wrapping)
hi UT1 ctermfg=darkgray
hi UT2 ctermfg=darkgray
hi UT3 ctermfg=darkgray
hi UT4 ctermfg=darkgray
hi UT5 ctermfg=darkgray
hi UT6 ctermfg=darkgray
hi UT7 ctermfg=darkgray
hi UT8 ctermfg=darkgray
hi UT9 ctermfg=darkgray

" color for body text
hi BT1 ctermfg=darkgray
hi BT2 ctermfg=darkgray
hi BT3 ctermfg=darkgray
hi BT4 ctermfg=darkgray
hi BT5 ctermfg=darkgray
hi BT6 ctermfg=darkgray
hi BT7 ctermfg=darkgray
hi BT8 ctermfg=darkgray
hi BT9 ctermfg=darkgray

" color for pre-formatted text
hi PT1 ctermfg=black
hi PT2 ctermfg=black
hi PT3 ctermfg=black
hi PT4 ctermfg=black
hi PT5 ctermfg=black
hi PT6 ctermfg=black
hi PT7 ctermfg=black
hi PT8 ctermfg=black
hi PT9 ctermfg=black

" color for user text (non-wrapping)
hi UB1 ctermfg=black
hi UB2 ctermfg=black
hi UB3 ctermfg=black
hi UB4 ctermfg=black
hi UB5 ctermfg=black
hi UB6 ctermfg=black
hi UB7 ctermfg=black
hi UB8 ctermfg=black
hi UB9 ctermfg=black

" colors for folded sections
hi Folded     ctermfg=darkgreen
hi FoldColumn ctermfg=darkblue ctermbg=grey


_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner

colortest.vim (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: color schemes messed up

Noel Henson
In reply to this post by Claus Atzenbeck
he: vo-color


Noel

On Sunday 11 March 2007 01:32, Claus Atzenbeck wrote:

> Hi all,
>
> I started using vimoutliner and I like it. However, apparently it messes
> up the color schemes of other (non-otl) documents. I am using vim 7 (not
> gvim) in the Terminal on Mac OS X.
>
> For example, when I open ~/.vimrc, vim uses a specific color scheme.
> That's fine.  However, when I open the same file *after* opening an .otl
> file, .vimrc looks completely different. For example, keywords like
> "map" suddenly appear in bold face vimoutliner has been loaded.
>
> I changed the ~/.vim/colors/vo_dark.vim file, because it produced many
> bold fonts (which are nowhere defined). Even LineNr changed from normal
> font to bold after vimoutliner was loaded.
>
> How can I force vimoutliner only to touch .otl relevant colors, but not
> others? Especially the fact that suddenly many bold face fonts appear
> makes me wonder, because I don't see any ":hi xxx cterm=bold" defined in
> .vim/*.
>
> Thanks for any hint.
> Claus
> _______________________________________________
> VimOutliner mailing list
> [hidden email]
> http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner

--

------------------------------------------------------------------
  Noel Henson
  www.noels-lab.com Chips, firmware and embedded systems
  www.vimoutliner.org Work fast. Think well.

_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: color schemes messed up

Claus Atzenbeck
In reply to this post by Sam Roberts-2
On Sun, 11 Mar 2007, Sam Roberts wrote:

> Look in ./vim/syntax/vo_base.vim, and you will see what it sets all the
> colors to, for light or dark backgrounds. Don't change them there, but
> copy either all the definitions, or the ones you want to change into
> .vim/after/syntax/vo_base.vim, and set them to be the colors you want.

Thanks, this solves my problem. BTW, the fact that my terminal mostly
had bold face fonts was caused by the colors in the list. For example,
red is displayed in bold face (by default) whereas darkred is in normal
font.

Cheers,
Claus
_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: color schemes messed up

Sam Roberts-2
In reply to this post by Noel Henson
Quoting [hidden email], on Mon, Mar 12, 2007 at 09:29:42AM -0700:
> he: vo-color

Noel,

I'm no vim guru, but isn't the advice here not so useful for those using
vim for things other than .otl files?

This "colorscheme" only sets colors for vo related things, so all the
colors for the (presumably standard) kinds of objects set by the
colorschemes that come with vim get lost.

Wouldn't it make more sense for people to keep using whatever color
scheme they currently have (and probably want to have, assuming they use
vim for things other than outlining), and to set the vo colors by using
a .vim/after/syntax/vo_base.vim file?

I'm wondering if this colorscheme docs predates vo being rewritten as a
plugin? If vo used to be some kind of standalone vim-using application,
using a global colorschem would be fine, but if you have an .otl file in
one buffer, and a .c file in another, things don't work so well, at
least not for me or the original poster.

Cheers,
Sam

_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: color schemes messed up

Tim Roberts
Sam Roberts wrote:
Quoting [hidden email], on Mon, Mar 12, 2007 at 09:29:42AM -0700:
  
he: vo-color
    

Noel,

I'm no vim guru, but isn't the advice here not so useful for those using
vim for things other than .otl files?

This "colorscheme" only sets colors for vo related things, so all the
colors for the (presumably standard) kinds of objects set by the
colorschemes that come with vim get lost.

Wouldn't it make more sense for people to keep using whatever color
scheme they currently have (and probably want to have, assuming they use
vim for things other than outlining), and to set the vo colors by using
a .vim/after/syntax/vo_base.vim file?
  

When I installed vo, it installed two color scheme files in vimfiles\colors: vo_dark.vim and vo_light.vim.  Those two color schemes apply only to .otl files, and the appropriate file is chosen based on whether I have background set to dark or light.  When I switch back to a .c file, it has the normal C coloration.

Now, I admit that I have played very little with vim color schemes, but my experience so far has been that the vo color scheme doesn't affect my normal editing.
-- 
Tim Roberts, [hidden email]
Providenza & Boekelheide, Inc.

_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: color schemes messed up

Sam Roberts-2
Quoting [hidden email], on Mon, Mar 12, 2007 at 02:00:27PM -0700:

> Sam Roberts wrote:
> > Quoting [hidden email], on Mon, Mar 12, 2007 at 09:29:42AM -0700:
> >  
> >> he: vo-color
> >>    
> >
> > Noel,
> >
> > I'm no vim guru, but isn't the advice here not so useful for those using
> > vim for things other than .otl files?
> >
> > This "colorscheme" only sets colors for vo related things, so all the
> > colors for the (presumably standard) kinds of objects set by the
> > colorschemes that come with vim get lost.
> >
> > Wouldn't it make more sense for people to keep using whatever color
> > scheme they currently have (and probably want to have, assuming they use
> > vim for things other than outlining), and to set the vo colors by using
> > a .vim/after/syntax/vo_base.vim file?
> >  
>
> When I installed vo, it installed two color scheme files in
> vimfiles\colors: vo_dark.vim and vo_light.vim.  Those two color schemes
> apply only to .otl files, and the appropriate file is chosen based on
> whether I have background set to dark or light.  When I switch back to a
> .c file, it has the normal C coloration.

Thats because the two vo ones don't set any of the things that
colorschemes are supposed to set! Setting it goes mostly unnoticed,
except that it resets the Folded and FoldColumn highlighting, and thats
used anywhere folding is, not just by vo.

> Now, I admit that I have played very little with vim color schemes, but
> my experience so far has been that the vo color scheme doesn't affect my
> normal editing.

Try this, go to a buffer with some language (c, perl, whatever), and set
the colorscheme to one of the provided ones:

  :colorscheme blue

for example. Now open a .otl file. What happened? Now call colorscheme
vo_dark there, what happens? Mangling happens.

Warning - I learned all this in my struggle to get vo to have readable
colors on my terminal, so I'm no expert, but here's what I  think I
found out:


As far as I can tell, a colorscheme is supposed to set the hi attribute
for a (fairly) language independent set of stuff. Then the syntax file
(usually) maps language-specific constructs to those
language-independent names. The things a colorscheme does are global, and
effect every syntax (that uses the global language-independent names).
The colorscheme exists as a way of getting colors that generally look ok
to you, but without having to make custom colors for every single
syntax, which would be a huge pain.

This pain is where vo is now, because even though it has the dark/light
switch, it was impossible to read many of the colors it uses on my
terminal. It required customization, I've only ever customized a single
thing about vim default syntax colors up until installing vo!

I think that .vim/syntax/vo_base.vim shouldn't actually have ANY colors
mentioned in it explicitly, it should just map the vo-specific object
types to  the generic object types that can be found in the
/usr/share/vim/colors/*.vim files. Then when a user has a colorscheme
and installs vo, it will use their colorscheme, rather than one of the
two it now sets based on the background setting, the assumption being
that the colors in the users current colorscheme are actually acceptable
to them, or why would they be using them? In my case, that means it will
never use cyan, because I find cyan impossible to read on my terminal!


The color-specific stuff that is in colors/vim_base.vim should be
chopped out into an example file. Then people who want vo objects to use
specific colors, not just the mappings it sets up to their colorscheme,
would copy one of those files to after/syntax/vo_base.vim, and customize
it to their hearts content, and it would have absolutely no effect on
their other syntax colorings.

Cheers,
Sam

_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: color schemes messed up

Steve Litt
In reply to this post by Sam Roberts-2
On Monday 12 March 2007 16:41, Sam Roberts wrote:
[clip]
> I'm wondering if this colorscheme docs predates vo being rewritten as a
> plugin?

VO version 0.1.3, from the fall of 2001, had a color scheme. I don't know if
it's changed since then. Version 0.1.3, and version 0.2.0 that followed it a
year later, were both NOT plugins.


> If vo used to be some kind of standalone vim-using application,

It was, until version 0.3.0 I believe.

All that being said, I don't think the VO color scheme interferes with my C
color scheme or my Ruby color scheme, unless I just don't notice it.

SteveT
_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: color schemes messed up

Tim Roberts
Steve Litt wrote:
On Monday 12 March 2007 16:41, Sam Roberts wrote:
[clip]
  
I'm wondering if this colorscheme docs predates vo being rewritten as a
plugin? 
    

VO version 0.1.3, from the fall of 2001, had a color scheme. I don't know if 
it's changed since then. Version 0.1.3, and version 0.2.0 that followed it a 
year later, were both NOT plugins.


  
If vo used to be some kind of standalone vim-using application, 
    

It was, until version 0.3.0 I believe.

All that being said, I don't think the VO color scheme interferes with my C 
color scheme or my Ruby color scheme, unless I just don't notice it.
  

Actually, I spoke too soon when I said it had no effect.  I brought up a C file, switched to an outline, then switched back to the C file, and noticed that the colors were different.  My background setting was changed from "light" to "dark".  Now, I did not dig into this, and it is *entirely* possible that *I* added a "set background" command to my vo configuration file at one point (I have a vague memory of doing that), so I don't want anyone to think that I'm assigning blame here.

The colors in the C file were correct, it's just that they were correct for a dark background.
-- 
Tim Roberts, [hidden email]
Providenza & Boekelheide, Inc.

_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner