[Vimoutliner] color schemes messed up
Sam Roberts
sroberts at uniserve.com
Sun Mar 11 16:24:42 EST 2007
Quoting claus.atzenbeck at freenet.de, 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
-------------- next part --------------
" Vim script for testing colors
" Maintainer: Bram Moolenaar <Bram at vim.org>
" Contributors: Rafael Garcia-Suarez, Charles Campbell
" Last Change: 2006 Feb 20
" edit this file, then do ":source %", and check if the colors match
" darkred darkred_on_white white_on_darkred
" darkred_on_black black_on_darkred
" red red_on_white white_on_red
" red_on_black black_on_red
" lightred lightred_on_white white_on_lightred
" lightred_on_black black_on_lightred
" darkgreen darkgreen_on_white white_on_darkgreen
" darkgreen_on_black black_on_darkgreen
" green green_on_white white_on_green
" green_on_black black_on_green
" lightgreen lightgreen_on_white white_on_lightgreen
" lightgreen_on_black black_on_lightgreen
" darkblue darkblue_on_white white_on_darkblue
" darkblue_on_black black_on_darkblue
" blue blue_on_white white_on_blue
" blue_on_black black_on_blue
" lightblue lightblue_on_white white_on_lightblue
" lightblue_on_black black_on_lightblue
" darkmagenta darkmagenta_on_white white_on_darkmagenta
" darkmagenta_on_black black_on_darkmagenta
" magenta magenta_on_white white_on_magenta
" magenta_on_black black_on_magenta
" lightmagenta lightmagenta_on_white white_on_lightmagenta
" lightmagenta_on_black black_on_lightmagenta
" darkcyan darkcyan_on_white white_on_darkcyan
" darkcyan_on_black black_on_darkcyan
" cyan cyan_on_white white_on_cyan
" cyan_on_black black_on_cyan
" lightcyan lightcyan_on_white white_on_lightcyan
" lightcyan_on_black black_on_lightcyan
" darkgray darkgray_on_white white_on_darkgray
" darkgray_on_black black_on_darkgray
" grey grey_on_white white_on_grey
" grey_on_black black_on_grey
" lightgray lightgray_on_white white_on_lightgray
" lightgray_on_black black_on_lightgray
" yellow yellow_on_white white_on_yellow
" yellow_on_black black_on_yellow
" lightyellow lightyellow_on_white white_on_lightyellow
" lightyellow_on_black black_on_lightyellow
" brown brown_on_white white_on_brown
" brown_on_black black_on_brown
" black black_on_white white_on_black
" black_on_black black_on_black
" white white_on_white white_on_white
" white_on_black black_on_white
" Open this file in a window if it isn't edited yet.
" Use the current window if it's empty.
if expand('%:p') != expand('<sfile>:p')
if &mod || line('$') != 1 || getline(1) != ''
exe "new " . expand('<sfile>')
else
exe "edit " . expand('<sfile>')
endif
endif
syn clear
8
while search("_on_", "W") < 55
let col1 = substitute(expand("<cword>"), '\(\a\+\)_on_\a\+', '\1', "")
let col2 = substitute(expand("<cword>"), '\a\+_on_\(\a\+\)', '\1', "")
exec 'hi col_'.col1.'_'.col2.' ctermfg='.col1.' guifg='.col1.' ctermbg='.col2.' guibg='.col2
exec 'syn keyword col_'.col1.'_'.col2.' '.col1.'_on_'.col2
endwhile
8,54g/^" \a/exec 'hi col_'.expand("<cword>").' ctermfg='.expand("<cword>").' guifg='.expand("<cword>")| exec 'syn keyword col_'.expand("<cword>")." ".expand("<cword>")
nohlsearch
More information about the VimOutliner
mailing list