aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Kempson <git@chriskempson.com>2016-06-25 10:15:42 +0100
committerChris Kempson <git@chriskempson.com>2016-06-25 10:15:42 +0100
commit6fa899d29be4fe9bc2abe051f9502efa7dd6bb41 (patch)
tree4eaac2503ee15eb8eeade487f597a23e8ed19bb7
parent98aa775c5fd9156ada4f912a9af41f1c020da55d (diff)
Updates template file
-rw-r--r--template.mustache68
1 files changed, 7 insertions, 61 deletions
diff --git a/template.mustache b/template.mustache
index a87cc14..b4f5acb 100644
--- a/template.mustache
+++ b/template.mustache
@@ -1,6 +1,6 @@
-" base16-vim-{{scheme-slug}} (https://github.com/chriskempson/base16-vim)
-" Template: Chris Kempson (http://chriskempson.com)
-" Scheme: {{scheme-name}} by {{scheme-author}}
+" base16-vim (https://github.com/chriskempson/base16-vim)
+" by Chris Kempson (http://chriskempson.com)
+" {{scheme-name}} scheme by {{scheme-author}}
" This enables the coresponding base16-shell script to run so that
" :colorscheme works in terminals supported by base16-shell scripts
@@ -65,16 +65,16 @@ let g:colors_name = "base16-{{scheme-slug}}"
" Highlighting function
fun <sid>hi(group, guifg, guibg, ctermfg, ctermbg, attr, guisp)
if a:guifg != ""
- exec "hi " . a:group . " guifg=#" . s:gui(a:guifg)
+ exec "hi " . a:group . " guifg=#" . a:guifg
endif
if a:guibg != ""
- exec "hi " . a:group . " guibg=#" . s:gui(a:guibg)
+ exec "hi " . a:group . " guibg=#" . a:guibg
endif
if a:ctermfg != ""
- exec "hi " . a:group . " ctermfg=" . s:cterm(a:ctermfg)
+ exec "hi " . a:group . " ctermfg=" . a:ctermfg
endif
if a:ctermbg != ""
- exec "hi " . a:group . " ctermbg=" . s:cterm(a:ctermbg)
+ exec "hi " . a:group . " ctermbg=" . a:ctermbg
endif
if a:attr != ""
exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr
@@ -84,60 +84,6 @@ fun <sid>hi(group, guifg, guibg, ctermfg, ctermbg, attr, guisp)
endif
endfun
-" Return GUI color for light/dark variants
-fun s:gui(color)
- if &background == "dark"
- return a:color
- endif
-
- if a:color == s:gui00
- return s:gui07
- elseif a:color == s:gui01
- return s:gui06
- elseif a:color == s:gui02
- return s:gui05
- elseif a:color == s:gui03
- return s:gui04
- elseif a:color == s:gui04
- return s:gui03
- elseif a:color == s:gui05
- return s:gui02
- elseif a:color == s:gui06
- return s:gui01
- elseif a:color == s:gui07
- return s:gui00
- endif
-
- return a:color
-endfun
-
-" Return terminal color for light/dark variants
-fun s:cterm(color)
- if &background == "dark"
- return a:color
- endif
-
- if a:color == s:cterm00
- return s:cterm07
- elseif a:color == s:cterm01
- return s:cterm06
- elseif a:color == s:cterm02
- return s:cterm05
- elseif a:color == s:cterm03
- return s:cterm04
- elseif a:color == s:cterm04
- return s:cterm03
- elseif a:color == s:cterm05
- return s:cterm02
- elseif a:color == s:cterm06
- return s:cterm01
- elseif a:color == s:cterm07
- return s:cterm00
- endif
-
- return a:color
-endfun
-
" Vim editor colors
call <sid>hi("Bold", "", "", "", "", "bold", "")
call <sid>hi("Debug", s:gui08, "", s:cterm08, "", "", "")