Highlight comments on the end of lines in SASS

This commit is contained in:
Gregory McIntyre
2012-11-03 10:11:32 +11:00
committed by Tim Pope
parent 81af73f76e
commit 410a6a0517
+3 -1
View File
@@ -13,7 +13,7 @@ runtime! syntax/css.vim
syn case ignore syn case ignore
syn cluster sassCssProperties contains=cssFontProp,cssFontDescriptorProp,cssColorProp,cssTextProp,cssBoxProp,cssGeneratedContentProp,cssPagingProp,cssUIProp,cssRenderProp,cssAuralProp,cssTableProp syn cluster sassCssProperties contains=cssFontProp,cssFontDescriptorProp,cssColorProp,cssTextProp,cssBoxProp,cssGeneratedContentProp,cssPagingProp,cssUIProp,cssRenderProp,cssAuralProp,cssTableProp
syn cluster sassCssAttributes contains=css.*Attr,scssComment,cssValue.*,cssColor,cssURL,sassDefault,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssRenderProp syn cluster sassCssAttributes contains=css.*Attr,sassEndOfLineComment,scssComment,cssValue.*,cssColor,cssURL,sassDefault,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssRenderProp
syn region sassDefinition matchgroup=cssBraces start="{" end="}" contains=TOP syn region sassDefinition matchgroup=cssBraces start="{" end="}" contains=TOP
@@ -67,7 +67,9 @@ syn keyword sassFor from to through in contained
syn keyword sassTodo FIXME NOTE TODO OPTIMIZE XXX contained syn keyword sassTodo FIXME NOTE TODO OPTIMIZE XXX contained
syn region sassComment start="^\z(\s*\)//" end="^\%(\z1 \)\@!" contains=sassTodo,@Spell syn region sassComment start="^\z(\s*\)//" end="^\%(\z1 \)\@!" contains=sassTodo,@Spell
syn region sassCssComment start="^\z(\s*\)/\*" end="^\%(\z1 \)\@!" contains=sassTodo,@Spell syn region sassCssComment start="^\z(\s*\)/\*" end="^\%(\z1 \)\@!" contains=sassTodo,@Spell
syn match sassEndOfLineComment "//.*" contains=sassComment,sassTodo,@Spell
hi def link sassEndOfLineComment sassComment
hi def link sassCssComment sassComment hi def link sassCssComment sassComment
hi def link sassComment Comment hi def link sassComment Comment
hi def link sassDefault cssImportant hi def link sassDefault cssImportant