annotate vendor/vim-syntax/less.vim @ 543:8b884bbb1d05

Rename `app` to `apps`.
author edogawaconan <me@myconan.net>
date Sat, 17 Jan 2015 20:10:45 +0900
parents 50fd59a959ea
children 7fbadf8bd22e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
540
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
1 if exists("b:current_syntax")
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
2 finish
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
3 endif
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
4
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
5 runtime! syntax/css.vim
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
6 runtime! after/syntax/css.vim
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
7 " load files from vim-css3-syntax plugin (https://github.com/hail2u/vim-css3-syntax)
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
8 runtime! after/syntax/css/*.vim
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
9
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
10 syn case ignore
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
11
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
12 syn region lessDefinition transparent matchgroup=cssBraces start='{' end='}' contains=css.*Attr,css.*Prop,cssComment,cssValue.*,cssColor,cssTagName,cssPseudoClass,cssUrl,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,lessDefinition,lessComment,lessClassChar,lessVariable,lessMixinChar,lessAmpersandChar,lessFunction,lessNestedSelector,@cssColors fold
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
13
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
14 syn match lessVariable "@[[:alnum:]_-]\+" contained
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
15 syn match lessVariable "@[[:alnum:]_-]\+" nextgroup=lessVariableAssignment skipwhite
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
16 syn match lessVariableAssignment ":" contained nextgroup=lessVariableValue skipwhite
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
17 syn match lessVariableValue ".*;"me=e-1 contained contains=lessVariable,lessOperator,lessDefault,cssValue.*,@cssColors "me=e-1 means that the last char of the pattern is not highlighted
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
18
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
19 syn match lessOperator "+" contained
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
20 syn match lessOperator "-" contained
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
21 syn match lessOperator "/" contained
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
22 syn match lessOperator "*" contained
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
23
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
24 syn match lessNestedSelector "[^/]* {"me=e-1 contained contains=cssTagName,cssAttributeSelector,lessAmpersandChar,lessVariable,lessMixinChar,lessFunction,lessNestedProperty
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
25 syn match lessNestedProperty "[[:alnum:]]\+:"me=e-1 contained
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
26
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
27 syn match lessDefault "!default" contained
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
28
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
29 syn match lessMixinChar "\.[[:alnum:]_-]\@=" contained nextgroup=lessClass
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
30 syn match lessAmpersandChar "&" contained nextgroup=lessClass,cssPseudoClass
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
31 syn match lessClass "[[:alnum:]_-]\+" contained
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
32
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
33 " functions {{{
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
34
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
35 " string functions
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
36 syn keyword lessFunction escape e % containedin=cssDefinition contained
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
37 " misc functions
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
38 syn keyword lessFunction unit containedin=cssDefinition contained
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
39 " math functions
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
40 syn keyword lessFunction ceil floor percentage round containedin=cssDefinition contained
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
41 " color definition
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
42 syn keyword lessFunction rgb rgba argb hsl hsla hsv hsva containedin=cssDefinition contained
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
43 " color channel information
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
44 syn keyword lessFunction hue saturation lightness red green blue alpha luma containedin=cssDefinition contained
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
45 " color operations
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
46 syn keyword lessFunction saturate desaturate lighten darken fadein fadeout fade spin mix greyscale contrast containedin=cssDefinition contained
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
47 " color blending
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
48 syn keyword lessFunction multiply screen overlay softlight hardlight difference exclusion average negation containedin=cssDefinition contained
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
49
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
50 " }}}
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
51
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
52 syn match lessComment "//.*$" contains=@Spell
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
53
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
54 hi def link lessVariable Special
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
55 hi def link lessVariableValue Constant
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
56 hi def link lessDefault Special
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
57 hi def link lessComment Comment
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
58 hi def link lessFunction Function
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
59 hi def link lessMixinChar Special
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
60 hi def link lessAmpersandChar Special
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
61 hi def link lessNestedProperty Type
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
62 hi def link lessClass PreProc
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
63
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
64 let b:current_syntax = "less"