Skip to content

Commit

Permalink
Fixing #24
Browse files Browse the repository at this point in the history
  • Loading branch information
morhetz committed Apr 9, 2014
1 parent c12826b commit 3502bb9
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions colors/gruvbox.vim
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,8 @@ function! s:HL(group, fg, ...)
let histring .= 'guibg=NONE ctermbg=NONE '
endif

" Hotfixing #24;
" TODO: get rid of this spaghetti
if a:0 >= 2 && strlen(a:2)
if a:2 == 'none'
let histring .= 'gui=NONE cterm=NONE '
Expand All @@ -231,6 +233,36 @@ function! s:HL(group, fg, ...)
else
let histring .= 'gui=' . a:2 . ' cterm=' . a:2 . ' '
endif
elseif a:2 == 'bold,underline'
if g:gruvbox_underline == 0 && g:gruvbox_bold == 0
let histring .= 'gui=NONE cterm=NONE '
elseif g:gruvbox_underline == 0
let histring .= 'gui=bold cterm=bold '
elseif g:gruvbox_bold == 0
let histring .= 'gui=underline cterm=underline '
else
let histring .= 'gui=' . a:2 . ' cterm=' . a:2 . ' '
endif
elseif a:2 == 'underline,italic'
if g:gruvbox_underline == 0 && g:gruvbox_italic == 0
let histring .= 'gui=NONE cterm=NONE '
elseif g:gruvbox_underline == 0
let histring .= 'gui=italic cterm=italic '
elseif g:gruvbox_italic == 0
let histring .= 'gui=underline cterm=underline '
else
let histring .= 'gui=' . a:2 . ' cterm=' . a:2 . ' '
endif
elseif a:2 == 'bold,underline,italic'
if g:gruvbox_italic == 0 && g:gruvbox_bold == 0
let histring .= 'gui=underline cterm=underline '
elseif g:gruvbox_italic == 0
let histring .= 'gui=bold,underline cterm=bold,underline '
elseif g:gruvbox_bold == 0
let histring .= 'gui=italic,underline cterm=italic,underline '
else
let histring .= 'gui=' . a:2 . ' cterm=' . a:2 . ' '
endif
else
let histring .= 'gui=' . a:2 . ' cterm=' . a:2 . ' '
endif
Expand Down Expand Up @@ -683,6 +715,15 @@ call s:HL('htmlLink', 'light4', 'none', 'underline')

call s:HL('htmlSpecialChar', 'orange')

call s:HL('htmlBold', 'fg', 'bg', 'bold')
call s:HL('htmlBoldUnderline', 'fg', 'bg', 'bold,underline')
call s:HL('htmlBoldItalic', 'fg', 'bg', 'bold,italic')
call s:HL('htmlBoldUnderlineItalic', 'fg', 'bg', 'bold,underline,italic')

call s:HL('htmlUnderline', 'fg', 'bg', 'underline')
call s:HL('htmlUnderlineItalic', 'fg', 'bg', 'underline,italic')
call s:HL('htmlItalic', 'fg', 'bg', 'italic')

" }}}
" Xml: {{{

Expand Down

0 comments on commit 3502bb9

Please sign in to comment.