annotate rc/vim-syntax-scss @ 419:587abe573053

Added PATH for pgdg 9.2. Sure has been ages last time I tried that :/
author Edho Arief <edho@myconan.net>
date Tue, 11 Dec 2012 16:15:34 -0500
parents 0aabb2b34ef6
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
393
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
1 " Vim syntax file
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
2 " Language: SCSS (Sassy CSS)
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
3 " Author: Daniel Hofstetter (daniel.hofstetter@42dh.com)
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
4 " Inspired by the syntax files for sass and css. Thanks to the authors of
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
5 " those files!
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
6
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
7 if exists("b:current_syntax")
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
8 finish
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
9 endif
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
10
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
11 runtime! syntax/css.vim
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
12
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
13 syn case ignore
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
14
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
15 syn region scssDefinition transparent matchgroup=cssBraces start='{' end='}' contains=css.*Attr,css.*Prop,cssComment,cssValue.*,cssColor,cssUrl,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,scssDefinition,scssComment,scssIdChar,scssClassChar,scssAmpersand,scssVariable,scssInclude,scssExtend,scssDebug,scssWarn,@scssControl,scssInterpolation,scssNestedSelector,scssReturn
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
16
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
17 syn region scssInterpolation start="#{" end="}" contains=scssVariable
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
18
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
19 syn match scssVariable "$[[:alnum:]_-]\+" nextgroup=scssVariableAssignment
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
20 syn match scssVariableAssignment ":" contained nextgroup=scssVariableValue
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
21 syn match scssVariableValue ".*;"me=e-1 contained contains=scssVariable,scssOperator,scssDefault "me=e-1 means that the last char of the pattern is not highlighted
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
22 syn match scssMixin "^@mixin" nextgroup=scssMixinName
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
23 syn match scssMixinName " [[:alnum:]_-]\+" contained nextgroup=scssDefinition
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
24 syn match scssFunction "^@function" nextgroup=scssFunctionName
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
25 syn match scssFunctionName " [[:alnum:]_-]\+" contained nextgroup=scssDefinition
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
26 syn match scssReturn "@return" contained
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
27 syn match scssInclude "@include" nextgroup=scssMixinName
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
28 syn match scssExtend "@extend .*[;}]"me=e-1 contains=cssTagName,scssIdChar,scssClassChar
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
29
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
30 syn match scssColor "#[0-9A-Fa-f]\{3\}\>" contained
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
31 syn match scssColor "#[0-9A-Fa-f]\{6\}\>" contained
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
32
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
33 syn match scssIdChar "#[[:alnum:]_-]\@=" nextgroup=scssId contains=scssColor
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
34 syn match scssId "[[:alnum:]_-]\+" contained
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
35 syn match scssClassChar "\.[[:alnum:]_-]\@=" nextgroup=scssClass
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
36 syn match scssClass "[[:alnum:]_-]\+" contained
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
37 syn match scssAmpersand "&" nextgroup=cssPseudoClass
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
38
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
39 syn match scssOperator "+" contained
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
40 syn match scssOperator "-" contained
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
41 syn match scssOperator "/" contained
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
42 syn match scssOperator "*" contained
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
43
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
44 syn match scssNestedSelector "[^/]* {"me=e-1 contained contains=cssTagName,cssAttributeSelector,scssIdChar,scssClassChar,scssAmpersand,scssVariable,scssMixin,scssFunction,@scssControl,scssInterpolation,scssNestedProperty
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
45 syn match scssNestedProperty "[[:alnum:]]\+:"me=e-1 contained
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
46
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
47 syn match scssDebug "@debug"
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
48 syn match scssWarn "@warn"
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
49 syn match scssDefault "!default" contained
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
50
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
51 syn match scssIf "@if"
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
52 syn match scssElse "@else"
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
53 syn match scssElseIf "@else if"
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
54 syn match scssWhile "@while"
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
55 syn match scssFor "@for" nextgroup=scssVariable
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
56 syn match scssFrom " from "
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
57 syn match scssTo " to "
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
58 syn match scssThrough " through "
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
59 syn match scssEach "@each" nextgroup=scssVariable
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
60 syn match scssIn " in "
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
61 syn cluster scssControl contains=scssIf,scssElse,scssElseIf,scssWhile,scssFor,scssFrom,scssTo,scssThrough,scssEach,scssIn
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
62
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
63 syn match scssComment "//.*$" contains=@Spell
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
64 syn region scssImportStr start="\"" end="\""
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
65 syn region scssImport start="@import" end=";" contains=scssImportStr,scssComment,cssComment,cssUnicodeEscape,cssMediaType
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
66
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
67 hi def link scssVariable Identifier
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
68 hi def link scssVariableValue Constant
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
69 hi def link scssMixin PreProc
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
70 hi def link scssMixinName Function
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
71 hi def link scssFunction PreProc
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
72 hi def link scssFunctionName Function
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
73 hi def link scssReturn Statement
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
74 hi def link scssInclude PreProc
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
75 hi def link scssExtend PreProc
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
76 hi def link scssComment Comment
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
77 hi def link scssColor Constant
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
78 hi def link scssIdChar Special
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
79 hi def link scssClassChar Special
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
80 hi def link scssId Identifier
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
81 hi def link scssClass Identifier
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
82 hi def link scssAmpersand Character
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
83 hi def link scssNestedProperty Type
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
84 hi def link scssDebug Debug
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
85 hi def link scssWarn Debug
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
86 hi def link scssDefault Special
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
87 hi def link scssIf Conditional
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
88 hi def link scssElse Conditional
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
89 hi def link scssElseIf Conditional
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
90 hi def link scssWhile Repeat
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
91 hi def link scssFor Repeat
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
92 hi def link scssFrom Repeat
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
93 hi def link scssTo Repeat
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
94 hi def link scssThrough Repeat
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
95 hi def link scssEach Repeat
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
96 hi def link scssIn Repeat
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
97 hi def link scssInterpolation Delimiter
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
98 hi def link scssImport Include
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
99 hi def link scssImportStr Include
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
100
0aabb2b34ef6 Added scss vim syntax support.
Edho Arief <edho@myconan.net>
parents:
diff changeset
101 let b:current_syntax = "scss"