From efe9eada3313f42845e2b833b9037e076a192a4f Mon Sep 17 00:00:00 2001 From: Thomas Pelletier Date: Mon, 16 Apr 2012 09:47:12 +0200 Subject: [PATCH] Add an option to highlight CSS properties. --- README.markdown | 9 +++++++++ colors/badwolf.vim | 22 +++++++++++++++++----- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/README.markdown b/README.markdown index 5ef0aa6..0635ea2 100644 --- a/README.markdown +++ b/README.markdown @@ -49,6 +49,15 @@ Determines whether text inside `a` tags in HTML files will be underlined. Default: `1` (on) +### g:badwolf\_css\_props\_highlight + +Determines whether CSS properties should be highlighted. + + " Turn on CSS properties highlighting + let g:badwolf_css_props_highlight = 1 + +Default: `0` (off) + Contributing ------------ diff --git a/colors/badwolf.vim b/colors/badwolf.vim index 6a282bb..dc88ad3 100644 --- a/colors/badwolf.vim +++ b/colors/badwolf.vim @@ -47,6 +47,10 @@ if !exists("g:badwolf_html_link_underline") " {{{ let g:badwolf_html_link_underline = 1 endif " }}} +if !exists("g:badwolf_css_props_highlight") " {{{ + let g:badwolf_css_props_highlight = 0 +endif " }}} + " }}} " Palette {{{ @@ -397,11 +401,19 @@ call s:HL('clojureAnonArg', 'snow', '', 'bold') " }}} " CSS {{{ -call s:HL('cssColorProp', 'fg', '', 'none') -call s:HL('cssBoxProp', 'fg', '', 'none') -call s:HL('cssTextProp', 'fg', '', 'none') -call s:HL('cssRenderProp', 'fg', '', 'none') -call s:HL('cssGeneratedContentProp', 'fg', '', 'none') +if g:badwolf_css_props_highlight + call s:HL('cssColorProp', 'dirtyblonde', '', 'none') + call s:HL('cssBoxProp', 'dirtyblonde', '', 'none') + call s:HL('cssTextProp', 'dirtyblonde', '', 'none') + call s:HL('cssRenderProp', 'dirtyblonde', '', 'none') + call s:HL('cssGeneratedContentProp', 'dirtyblonde', '', 'none') +else + call s:HL('cssColorProp', 'fg', '', 'none') + call s:HL('cssBoxProp', 'fg', '', 'none') + call s:HL('cssTextProp', 'fg', '', 'none') + call s:HL('cssRenderProp', 'fg', '', 'none') + call s:HL('cssGeneratedContentProp', 'fg', '', 'none') +end call s:HL('cssValueLength', 'toffee', '', 'bold') call s:HL('cssColor', 'toffee', '', 'bold')