Properly highlight SCSS comments

This commit is contained in:
Tim Pope
2010-07-25 14:36:53 -04:00
parent 8a78d1b30e
commit 54139ceb5b
2 changed files with 7 additions and 2 deletions

View File

@@ -12,7 +12,7 @@ runtime! syntax/css.vim
syn case ignore
syn cluster sassCssProperties contains=cssFontProp,cssFontDescriptorProp,cssColorProp,cssTextProp,cssBoxProp,cssGeneratedContentProp,cssPagingProp,cssUIProp,cssRenderProp,cssAuralProp,cssTableProp
syn cluster sassCssAttributes contains=css.*Attr,cssComment,cssValue.*,cssColor,cssURL,sassDefault,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssRenderProp
syn cluster sassCssAttributes contains=css.*Attr,scssComment,cssValue.*,cssColor,cssURL,sassDefault,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssRenderProp
syn region sassDefinition matchgroup=cssBraces start="{" end="}" contains=TOP
@@ -53,7 +53,7 @@ syn match sassAmpersand "&"
" TODO: Attribute namespaces
" TODO: Arithmetic (including strings and concatenation)
syn region sassInclude start="@import" end=";\|$" contains=cssComment,cssURL,cssUnicodeEscape,cssMediaType
syn region sassInclude start="@import" end=";\|$" contains=scssComment,cssURL,cssUnicodeEscape,cssMediaType
syn region sassDebugLine matchgroup=sassDebug start="@debug\>" end="$" contains=@sassCssAttributes,sassVariable,sassFunction
syn region sassControlLine matchgroup=sassControl start="@\%(if\|else\%(\s\+if\)\=\|while\|for\)\>" end="[{};]\@=\|$" contains=sassFor,@sassCssAttributes,sassVariable,sassFunction
syn keyword sassFor from to through contained

View File

@@ -9,6 +9,11 @@ endif
runtime! syntax/sass.vim
syn match scssComment "//.*" contains=sassTodo,@Spell
syn region scssComment start="/\*" end="\*/" contains=sassTodo,@Spell
hi def link scssComment sassComment
let b:current_syntax = "scss"
" vim:set sw=2: