From 6fa899d29be4fe9bc2abe051f9502efa7dd6bb41 Mon Sep 17 00:00:00 2001 From: Chris Kempson Date: Sat, 25 Jun 2016 10:15:42 +0100 Subject: Updates template file --- template.mustache | 68 ++++++------------------------------------------------- 1 file 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 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 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 hi("Bold", "", "", "", "", "bold", "") call hi("Debug", s:gui08, "", s:cterm08, "", "", "") -- cgit v1.2.3