aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Kempson <chriskempson@users.noreply.github.com>2018-10-08 13:38:31 +0100
committerGitHub <noreply@github.com>2018-10-08 13:38:31 +0100
commit4df653a1ae34968c7d2e4f991e9e4dd4fe932a45 (patch)
treebbfa1e54cd5298dbd566949f98b17c4a43bff60d
parent5fc66da56215a8c5b96c0d656ae335a255dde2c1 (diff)
parent9ba1ad4b2e8a7190d2c5c3940252c4a1282485f0 (diff)
Merge pull request #188 from aaether32323/change_hi_function
Let Base16hi optionally omit `attr` and `guisp`
-rw-r--r--templates/default.mustache6
1 files changed, 5 insertions, 1 deletions
diff --git a/templates/default.mustache b/templates/default.mustache
index ad820a2..28b0c41 100644
--- a/templates/default.mustache
+++ b/templates/default.mustache
@@ -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