diff options
author | Aman <29077900+aaether32323@users.noreply.github.com> | 2018-10-04 19:32:29 -0400 |
---|---|---|
committer | Aman <amanraoverma@gmail.com> | 2018-10-04 19:36:58 -0400 |
commit | 9ba1ad4b2e8a7190d2c5c3940252c4a1282485f0 (patch) | |
tree | 2c62fbd4fa66f1ba4bb8df105dbb3a6776ca5410 /templates/default.mustache | |
parent | fcce6bce6a2f4b14eea7ea388031c0aa65e4b67d (diff) |
Let Base16hi optionally omit `attr` and `guisp`
Diffstat (limited to 'templates/default.mustache')
-rw-r--r-- | templates/default.mustache | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/templates/default.mustache b/templates/default.mustache index b0ba92a..d8e74b9 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 |