From a7fdff3e5ab9241e2fe628cf14355480c08d2873 Mon Sep 17 00:00:00 2001 From: Bjorn Winckler Date: Sat, 17 Nov 2007 15:03:56 +0100 Subject: [PATCH] MacVim color scheme supports dark background Change background color with ":set background=dark" (see :h 'background') --- runtime/colors/macvim.vim | 129 ++++++++++++++++++++++++++++------------------ 1 file changed, 79 insertions(+), 50 deletions(-) diff --git a/runtime/colors/macvim.vim b/runtime/colors/macvim.vim index 836cab47..26c2f403 100644 --- a/runtime/colors/macvim.vim +++ b/runtime/colors/macvim.vim @@ -1,12 +1,13 @@ " MacVim colorscheme " " Maintainer: Bjorn Winckler -" Last Change: 2007 Nov 15 +" Last Change: 2007 Nov 17 +" +" This is the default MacVim color scheme. It supports both light and dark +" backgrounds (see :h 'background'). " -" Tell vim that this is a light color scheme: -set background=light highlight clear " Reset String -> Constant links etc if they were reset @@ -16,73 +17,101 @@ endif let colors_name = "macvim" + +" +" First list all groups common to both 'light' and 'dark' background. +" + " `:he highlight-groups` +hi CursorColumn guibg=#F1F5FA +hi CursorLine guibg=#F1F5FA +hi DiffAdd guibg=MediumSeaGreen +hi Directory guifg=#1600FF hi ErrorMsg guibg=Firebrick2 guifg=White +hi FoldColumn guibg=Grey guifg=DarkBlue +hi Folded guibg=#E6E6E6 guifg=DarkBlue hi IncSearch gui=reverse +hi LineNr guifg=#888888 guibg=#E6E6E6 hi ModeMsg gui=bold +hi MoreMsg gui=bold guifg=SeaGreen4 hi NonText gui=bold guifg=Blue -hi StatusLine gui=NONE guifg=White guibg=DarkSlateGray -hi StatusLineNC gui=NONE guifg=SlateGray guibg=Gray90 -hi VertSplit gui=NONE guifg=DarkSlateGray guibg=Gray90 -hi DiffText gui=NONE guibg=Gold -hi PmenuThumb gui=reverse +hi Pmenu guibg=LightSteelBlue1 hi PmenuSbar guibg=Grey -hi TabLineSel gui=bold -hi TabLineFill gui=reverse -hi Cursor guibg=fg guifg=bg -hi CursorIM guibg=fg guifg=bg -hi lCursor guibg=fg guifg=bg - - -hi Directory guifg=#1600FF -hi LineNr guifg=#888888 guibg=#E6E6E6 -hi MoreMsg gui=bold guifg=SeaGreen4 +hi PmenuSel guifg=White guibg=SkyBlue4 +hi PmenuThumb gui=reverse hi Question gui=bold guifg=Chartreuse4 -hi Search guibg=CadetBlue1 guifg=NONE +hi SignColumn guibg=Grey guifg=DarkBlue +hi SpecialKey guifg=Blue hi SpellBad guisp=Firebrick2 gui=undercurl hi SpellCap guisp=Blue gui=undercurl -hi SpellRare guisp=Magenta gui=undercurl hi SpellLocal guisp=DarkCyan gui=undercurl -hi Pmenu guibg=LightSteelBlue1 -hi PmenuSel guifg=White guibg=SkyBlue4 -hi SpecialKey guifg=Blue +hi SpellRare guisp=Magenta gui=undercurl +hi StatusLine gui=NONE guifg=White guibg=DarkSlateGray +hi StatusLineNC gui=NONE guifg=SlateGray guibg=Gray90 +hi TabLine gui=underline guibg=LightGrey +hi TabLineFill gui=reverse +hi TabLineSel gui=bold hi Title gui=bold guifg=DeepSkyBlue3 -hi WarningMsg guifg=Firebrick2 -hi WildMenu guibg=SkyBlue guifg=Black -hi Folded guibg=#E6E6E6 guifg=DarkBlue -hi FoldColumn guibg=Grey guifg=DarkBlue -hi SignColumn guibg=Grey guifg=DarkBlue +hi VertSplit gui=NONE guifg=DarkSlateGray guibg=Gray90 hi Visual guibg=MacSelectedTextBackgroundColor -hi DiffAdd guibg=MediumSeaGreen -hi DiffChange guibg=DeepSkyBlue -hi DiffDelete gui=bold guifg=Black guibg=SlateBlue -hi TabLine gui=underline guibg=LightGrey -hi CursorColumn guibg=#F1F5FA -hi CursorLine guibg=#F1F5FA "Data browser list view secondary color -hi MatchParen guifg=White guibg=MediumPurple1 -hi Normal gui=NONE guifg=MacTextColor guibg=MacTextBackgroundColor - +hi WarningMsg guifg=Firebrick2 " Syntax items (`:he group-name` -- more groups are available, these are just " the top level syntax items for now). +hi Error gui=NONE guifg=White guibg=Firebrick3 +hi Identifier gui=NONE guifg=Aquamarine4 guibg=NONE +hi Ignore gui=NONE guifg=bg guibg=NONE +hi PreProc gui=NONE guifg=DodgerBlue3 guibg=NONE +hi Special gui=NONE guifg=BlueViolet guibg=NONE +hi String gui=NONE guifg=SkyBlue4 guibg=NONE +hi Underlined gui=underline guifg=SteelBlue1 -hi Comment gui=italic guifg=Blue2 guibg=NONE -hi Constant gui=NONE guifg=DarkOrange guibg=NONE -hi String gui=NONE guifg=SkyBlue4 guibg=NONE -hi Boolean gui=NONE guifg=Red3 guibg=NONE -hi Identifier gui=NONE guifg=Aquamarine4 guibg=NONE -hi Statement gui=bold guifg=Maroon guibg=NONE -hi PreProc gui=NONE guifg=DodgerBlue3 guibg=NONE -hi Type gui=bold guifg=Green4 guibg=NONE -hi Special gui=NONE guifg=BlueViolet guibg=NONE -hi Underlined gui=underline guifg=SteelBlue1 -hi Ignore gui=NONE guifg=bg guibg=NONE -hi Error gui=NONE guifg=White guibg=Firebrick3 -hi Todo gui=NONE guifg=DarkGreen guibg=PaleGreen1 +" +" Groups that differ between 'light' and 'dark' background. +" + +if &background == "dark" + hi Boolean gui=NONE guifg=DeepPink4 guibg=NONE + hi Comment gui=italic guifg=CadetBlue3 + hi Constant gui=NONE guifg=Goldenrod1 guibg=NONE + hi Cursor guibg=LightSlateGrey guifg=bg + hi CursorIM guibg=LightSlateGrey guifg=bg + hi DiffChange guibg=MediumPurple4 + hi DiffDelete gui=bold guifg=White guibg=SlateBlue + hi DiffText gui=NONE guifg=White guibg=SteelBlue + hi MatchParen guifg=White guibg=Magenta + hi Normal guifg=Grey50 guibg=Grey10 + hi Search guibg=Blue4 guifg=NONE + hi Statement gui=bold guifg=Purple1 guibg=NONE + hi Todo gui=NONE guifg=Green4 guibg=DeepSkyBlue1 + hi Type gui=bold guifg=Cyan4 guibg=NONE + hi WildMenu guibg=SkyBlue guifg=White + hi lCursor guibg=LightSlateGrey guifg=bg +else + hi Boolean gui=NONE guifg=Red3 guibg=NONE + hi Comment gui=italic guifg=Blue2 guibg=NONE + hi Constant gui=NONE guifg=DarkOrange guibg=NONE + hi Cursor guibg=fg guifg=bg + hi CursorIM guibg=fg guifg=bg + hi DiffChange guibg=DeepSkyBlue + hi DiffDelete gui=bold guifg=Black guibg=SlateBlue + hi DiffText gui=NONE guibg=Gold + hi MatchParen guifg=White guibg=MediumPurple1 + hi Normal gui=NONE guifg=MacTextColor guibg=MacTextBackgroundColor + hi Search guibg=CadetBlue1 guifg=NONE + hi Statement gui=bold guifg=Maroon guibg=NONE + hi Todo gui=NONE guifg=DarkGreen guibg=PaleGreen1 + hi Type gui=bold guifg=Green4 guibg=NONE + hi WildMenu guibg=SkyBlue guifg=Black + hi lCursor guibg=fg guifg=bg +endif + +" " Change the selection color on focus change (but only if the "macvim" " colorscheme is active). +" if !exists("s:augroups_defined") au FocusLost * if exists("colors_name") && colors_name == "macvim" | hi Visual guibg=MacSecondarySelectedControlColor | endif au FocusGained * if exists("colors_name") && colors_name == "macvim" | hi Visual guibg=MacSelectedTextBackgroundColor | endif -- 2.11.4.GIT