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-bright.vim | 22 ++++++++++++---------- colors/base16-chalk.vim | 22 ++++++++++++---------- colors/base16-default.vim | 22 ++++++++++++---------- colors/base16-eighties.vim | 22 ++++++++++++---------- colors/base16-greenscreen.vim | 22 ++++++++++++---------- colors/base16-mocha.vim | 22 ++++++++++++---------- colors/base16-monokai.vim | 22 ++++++++++++---------- colors/base16-ocean.vim | 22 ++++++++++++---------- colors/base16-railscasts.vim | 22 ++++++++++++---------- colors/base16-solarized.vim | 22 ++++++++++++---------- colors/base16-tomorrow.vim | 22 ++++++++++++---------- 11 files changed, 132 insertions(+), 110 deletions(-) (limited to 'colors') diff --git a/colors/base16-bright.vim b/colors/base16-bright.vim index 343d7d8..985bdb2 100644 --- a/colors/base16-bright.vim +++ b/colors/base16-bright.vim @@ -54,23 +54,24 @@ let g:colors_name = "base16-bright" " 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, "") 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, "") diff --git a/colors/base16-default.vim b/colors/base16-default.vim index 5db7036..eda4a3e 100644 --- a/colors/base16-default.vim +++ b/colors/base16-default.vim @@ -54,23 +54,24 @@ let g:colors_name = "base16-default" " 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, "") diff --git a/colors/base16-eighties.vim b/colors/base16-eighties.vim index e64789e..b7aed5e 100644 --- a/colors/base16-eighties.vim +++ b/colors/base16-eighties.vim @@ -54,23 +54,24 @@ let g:colors_name = "base16-eighties" " 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, "") diff --git a/colors/base16-greenscreen.vim b/colors/base16-greenscreen.vim index 435af33..175cd09 100644 --- a/colors/base16-greenscreen.vim +++ b/colors/base16-greenscreen.vim @@ -54,23 +54,24 @@ let g:colors_name = "base16-greenscreen" " 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, "") diff --git a/colors/base16-mocha.vim b/colors/base16-mocha.vim index 28a21f4..30cd786 100644 --- a/colors/base16-mocha.vim +++ b/colors/base16-mocha.vim @@ -54,23 +54,24 @@ let g:colors_name = "base16-mocha" " 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, "") diff --git a/colors/base16-monokai.vim b/colors/base16-monokai.vim index 6fca04a..b53f133 100644 --- a/colors/base16-monokai.vim +++ b/colors/base16-monokai.vim @@ -54,23 +54,24 @@ let g:colors_name = "base16-monokai" " 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, "") diff --git a/colors/base16-ocean.vim b/colors/base16-ocean.vim index d405a55..90e4179 100644 --- a/colors/base16-ocean.vim +++ b/colors/base16-ocean.vim @@ -54,23 +54,24 @@ let g:colors_name = "base16-ocean" " 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, "") diff --git a/colors/base16-railscasts.vim b/colors/base16-railscasts.vim index 38ac7f5..f31ee97 100644 --- a/colors/base16-railscasts.vim +++ b/colors/base16-railscasts.vim @@ -54,23 +54,24 @@ let g:colors_name = "base16-railscasts" " 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, "") diff --git a/colors/base16-solarized.vim b/colors/base16-solarized.vim index d3a137d..3ed15d0 100644 --- a/colors/base16-solarized.vim +++ b/colors/base16-solarized.vim @@ -54,23 +54,24 @@ let g:colors_name = "base16-solarized" " 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, "") diff --git a/colors/base16-tomorrow.vim b/colors/base16-tomorrow.vim index 9b10b1b..a6674a7 100644 --- a/colors/base16-tomorrow.vim +++ b/colors/base16-tomorrow.vim @@ -54,23 +54,24 @@ let g:colors_name = "base16-tomorrow" " 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