Let Base16hi optionally omit attr and guisp

This commit is contained in:
Aman authored and Aman committed 2018-10-04 19:36:58 -04:00
1 parent fcce6bce6a
commit 9ba1ad4b2e
1 file changed
+5 -1
+5 -1
View File
@@ -129,7 +129,11 @@ syntax reset
let g:colors_name = "base16-{{scheme-slug}}"
" Highlighting function
function! g:Base16hi(group, guifg, guibg, ctermfg, ctermbg, attr, guisp)
" Optional variables are attributes and guisp
function! g:Base16hi(group, guifg, guibg, ctermfg, ctermbg, ...)
let a:attr = get(a:, 1, "")
let a:guisp = get(a:, 2, "")
if a:guifg != ""
exec "hi " . a:group . " guifg=#" . a:guifg
endif