From dffebc614d364b0e23cf35f224cb2e68434d135f Mon Sep 17 00:00:00 2001 From: Chris Kempson Date: Sun, 19 May 2013 13:07:00 +0100 Subject: Updated with base16-builder --- colors/base16-chalk.vim | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'colors/base16-chalk.vim') diff --git a/colors/base16-chalk.vim b/colors/base16-chalk.vim index 9d1b995..57e2dd2 100644 --- a/colors/base16-chalk.vim +++ b/colors/base16-chalk.vim @@ -54,23 +54,24 @@ let g:colors_name = "base16-chalk" " Highlighting function fun! hi(group, guifg, guibg, ctermfg, ctermbg, attr) if a:guifg != "" - exec "hi " . a:group . " guifg=#" . s:DarkOrLightGui(a:guifg) + exec "hi " . a:group . " guifg=#" . s:gui(a:guifg) endif if a:guibg != "" - exec "hi " . a:group . " guibg=#" . s:DarkOrLightGui(a:guibg) + exec "hi " . a:group . " guibg=#" . s:gui(a:guibg) endif if a:ctermfg != "" - exec "hi " . a:group . " ctermfg=" . s:DarkOrLightCterm(a:ctermfg) + exec "hi " . a:group . " ctermfg=" . s:cterm(a:ctermfg) endif if a:ctermbg != "" - exec "hi " . a:group . " ctermbg=" . s:DarkOrLightCterm(a:ctermbg) + exec "hi " . a:group . " ctermbg=" . s:cterm(a:ctermbg) endif if a:attr != "" exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr endif endfun -fun s:DarkOrLightGui(color) +" Return GUI color for light/dark variants +fun! s:gui(color) if &background == "dark" return a:color endif @@ -98,7 +99,8 @@ fun s:DarkOrLightGui(color) return a:color endfun -fun s:DarkOrLightCterm(color) +" Return terminal color for light/dark variants +fun! s:cterm(color) if &background == "dark" return a:color endif @@ -201,10 +203,10 @@ call hi("Type", s:gui09, "", s:cterm09, "", "none") call hi("Typedef", s:gui0A, "", s:cterm0A, "", "") " Spelling Highlighting -call hi("SpellBad", "", "NONE", "", "NONE", "undercurl") -call hi("SpellLocal", "", "NONE", "", "NONE", "undercurl") -call hi("SpellCap", "", "NONE", "", "NONE", "undercurl") -call hi("SpellRare", "", "NONE", "", "NONE", "undercurl") +call hi("SpellBad", "", s:gui00, "", s:cterm00, "undercurl") +call hi("SpellLocal", "", s:gui00, "", s:cterm00, "undercurl") +call hi("SpellCap", "", s:gui00, "", s:cterm00, "undercurl") +call hi("SpellRare", "", s:gui00, "", s:cterm00, "undercurl") " Additional Diff Highlighting call hi("DiffAdd", s:gui0B, s:gui00, s:cterm0B, s:cterm00, "") -- cgit v1.2.3