diff --git a/colors/wombat256grf.vim b/colors/wombat256grf.vim index fd1af4f..88458b3 100644 --- a/colors/wombat256grf.vim +++ b/colors/wombat256grf.vim @@ -161,20 +161,22 @@ fun s:get_rgb_as_index(rgb) endfun " sets the highlighting for the given group -fun X(group, fg, bg, attr) +fun s:highlight(group, fg, bg, attr) + let l:cmd = "highlight " . a:group if a:fg != "" - exec "hi ".a:group." guifg=#".a:fg." ctermfg=".s:get_rgb_as_index(a:fg) + let l:cmd .= " guifg=#" . a:fg . " ctermfg=" . s:get_rgb_as_index(a:fg) endif if a:bg != "" - exec "hi ".a:group." guibg=#".a:bg." ctermbg=".s:get_rgb_as_index(a:bg) + let l:cmd .= " guibg=#" . a:bg . " ctermbg=" . s:get_rgb_as_index(a:bg) endif if a:attr != "" if a:attr == 'italic' - exec "hi ".a:group." gui=".a:attr." cterm=none" + let l:cmd .= " gui=" . a:attr . " cterm=none" else - exec "hi ".a:group." gui=".a:attr." cterm=".a:attr + let l:cmd .= " gui=". a:attr. " cterm=" . a:attr endif endif + exec l:cmd endfun " same as above, but makes it for the spell-like things @@ -199,75 +201,74 @@ else endif -" X(fg, bg, attr) " non-syntax items, interface, etc -call X("Normal", "dddddd", "242424", "none") -call X("NonText", "4c4c36", "", "none") -call X("Cursor", "222222", "ecee90", "none") +call s:highlight("Normal", "dddddd", "242424", "none") +call s:highlight("NonText", "4c4c36", "", "none") +call s:highlight("Cursor", "222222", "ecee90", "none") if version > 700 - call X("CursorLine", "", "32322e", "none") + call s:highlight("CursorLine", "", "32322e", "none") hi link CursorColumn CursorLine if version > 703 - call X("ColorColumn", "", "2d2d2d", "") + call s:highlight("ColorColumn", "", "2d2d2d", "") endif endif -call X("Search", "444444", "ffab4b", "") -call X("MatchParen", "ecee90", "857b6f", "bold") -call X("SpecialKey", "6c6c6c", "2d2d2d", "none") -call X("Visual", "", "26512D", "none") -call X("LineNr", "857b6f", "121212", "none") -call X("SignColumn", "", "121212", "none") -call X("Folded", "a0a8b0", "404048", "none") -call X("Title", "f6f3e8", "", "bold") -call X("VertSplit", "444444", "444444", "none") -call X("StatusLine", "f6f3e8", "444444", s:italic) -call X("StatusLineNC", "857b6f", "444444", "none") -call X("Pmenu", "f6f3e8", "444444", "") -call X("PmenuSel", "121212", "caeb82", "") -call X("WarningMsg", "ff0000", "", "") +call s:highlight("Search", "444444", "ffab4b", "") +call s:highlight("MatchParen", "ecee90", "857b6f", "bold") +call s:highlight("SpecialKey", "6c6c6c", "2d2d2d", "none") +call s:highlight("Visual", "", "26512D", "none") +call s:highlight("LineNr", "857b6f", "121212", "none") +call s:highlight("SignColumn", "", "121212", "none") +call s:highlight("Folded", "a0a8b0", "404048", "none") +call s:highlight("Title", "f6f3e8", "", "bold") +call s:highlight("VertSplit", "444444", "444444", "none") +call s:highlight("StatusLine", "f6f3e8", "444444", s:italic) +call s:highlight("StatusLineNC", "857b6f", "444444", "none") +call s:highlight("Pmenu", "f6f3e8", "444444", "") +call s:highlight("PmenuSel", "121212", "caeb82", "") +call s:highlight("WarningMsg", "ff0000", "", "") hi! link VisualNOS Visual hi! link FoldColumn Folded hi! link TabLineSel StatusLine hi! link TabLineFill StatusLineNC hi! link TabLine StatusLineNC -call X("TabLineSel", "f6f3e8", "", "none") +call s:highlight("TabLineSel", "f6f3e8", "", "none") " syntax highlighting -call X("Comment", "99968b", "", s:italic) +call s:highlight("Comment", "99968b", "", s:italic) -call X("Constant", "e5786d", "", "none") -call X("String", "95e454", "", s:italic) +call s:highlight("Constant", "e5786d", "", "none") +call s:highlight("String", "95e454", "", s:italic) "Character "Number "Boolean "Float -call X("Identifier", "caeb82", "", "none") -call X("Function", "caeb82", "", "none") +call s:highlight("Identifier", "caeb82", "", "none") +call s:highlight("Function", "caeb82", "", "none") -call X("Statement", "87afff", "", "none") +call s:highlight("Statement", "87afff", "", "none") "Conditional "Repeat "Label "Operator -call X("Keyword", "87afff", "", "none") +call s:highlight("Keyword", "87afff", "", "none") "Exception -call X("PreProc", "e5786d", "", "none") +call s:highlight("PreProc", "e5786d", "", "none") "Include "Define "Macro "PreCondit -call X("Type", "caeb82", "", "none") +call s:highlight("Type", "caeb82", "", "none") "StorageClass "Structure "Typedef -call X("Special", "ffdead", "", "none") +call s:highlight("Special", "ffdead", "", "none") "SpecialChar "Tag "Delimiter @@ -278,15 +279,15 @@ call X("Special", "ffdead", "", "none") "Ignore -call X("Error", "bbbbbb", "aa0000", s:italic) +call s:highlight("Error", "bbbbbb", "aa0000", s:italic) -call X("Todo", "666666", "aaaa00", s:italic) +call s:highlight("Todo", "666666", "aaaa00", s:italic) " Diff -call X("DiffAdd", "", "505450", "bold") -call X("DiffText", "", "673400", "bold") -call X("DiffDelete", "343434", "101010", "bold") -call X("DiffChange", "", "53402d", "bold") +call s:highlight("DiffAdd", "", "505450", "bold") +call s:highlight("DiffText", "", "673400", "bold") +call s:highlight("DiffDelete", "343434", "101010", "bold") +call s:highlight("DiffChange", "", "53402d", "bold") " Spellchek if version > 700 @@ -299,24 +300,25 @@ endif " Plugins: " ShowMarks -call X("ShowMarksHLl", "ab8042", "121212", "bold") -call X("ShowMarksHLu", "aaab42", "121212", "bold") -call X("ShowMarksHLo", "42ab47", "121212", "bold") -call X("ShowMarksHLm", "aaab42", "121212", "bold") +call s:highlight("ShowMarksHLl", "ab8042", "121212", "bold") +call s:highlight("ShowMarksHLu", "aaab42", "121212", "bold") +call s:highlight("ShowMarksHLo", "42ab47", "121212", "bold") +call s:highlight("ShowMarksHLm", "aaab42", "121212", "bold") " Syntastic call Y("SyntasticError ", "880000") call Y("SyntasticWarning", "886600") call Y("SyntasticStyleError", "ff6600") call Y("SyntasticStyleWarning", "ffaa00") -call X("SyntasticErrorSign", "", "880000", "") -call X("SyntasticWarningSign", "", "886600", "") -call X("SyntasticStyleErrorSign", "", "ff6600", "") -call X("SyntasticStyleWarningSign", "", "ffaa00", "") +call s:highlight("SyntasticErrorSign", "", "880000", "") +call s:highlight("SyntasticWarningSign", "", "886600", "") +call s:highlight("SyntasticStyleErrorSign", "", "ff6600", "") +call s:highlight("SyntasticStyleWarningSign", "", "ffaa00", "") + " delete functions {{{ delf Y -delf X +delf s:highlight delf s:get_rgb_as_index delf s:get_color delf s:get_rgb_idx