annotate runtime/syntax/haml.vim @ 1937:d92bab35a167 v7.2.234

updated for version 7.2-234
author vimboss
date Tue, 14 Jul 2009 19:40:21 +0000
parents 5232b9862f23
children f7579a31705c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
1 " Vim syntax file
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
2 " Language: Haml
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
3 " Maintainer: Tim Pope <vimNOSPAM@tpope.info>
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
4 " Filenames: *.haml
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
5
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
6 if exists("b:current_syntax")
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
7 finish
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
8 endif
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
9
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
10 if !exists("main_syntax")
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
11 let main_syntax = 'haml'
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
12 endif
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
13 let b:ruby_no_expensive = 1
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
14
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
15 runtime! syntax/html.vim
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
16 unlet! b:current_syntax
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
17 silent! syn include @hamlSassTop syntax/sass.vim
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
18 unlet! b:current_syntax
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
19 syn include @hamlRubyTop syntax/ruby.vim
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
20
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
21 syn case match
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
22
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
23 syn cluster hamlComponent contains=hamlAttributes,hamlClassChar,hamlIdChar,hamlObject,hamlDespacer,hamlSelfCloser,hamlRuby,hamlPlainChar,hamlInterpolatable
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
24 syn cluster hamlEmbeddedRuby contains=hamlAttributes,hamlObject,hamlRuby,hamlRubyFilter
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
25 syn cluster hamlTop contains=hamlBegin,hamlPlainFilter,hamlRubyFilter,hamlSassFilter,hamlComment,hamlHtmlComment
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
26
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
27 syn match hamlBegin "^\s*[<>&]\@!" nextgroup=hamlTag,hamlAttributes,hamlClassChar,hamlIdChar,hamlObject,hamlRuby,hamlPlainChar,hamlInterpolatable
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
28
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
29 syn match hamlTag "%\w\+" contained contains=htmlTagName,htmlSpecialTagName nextgroup=@hamlComponent
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
30 syn region hamlAttributes matchgroup=hamlAttributesDelimiter start="{" end="}" contained contains=@hamlRubyTop nextgroup=@hamlComponent
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
31 syn region hamlObject matchgroup=hamlObjectDelimiter start="\[" end="\]" contained contains=@hamlRubyTop nextgroup=@hamlComponent
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
32 syn match hamlDespacer "[<>]" contained nextgroup=hamlDespacer,hamlSelfCloser,hamlRuby,hamlPlainChar,hamlInterpolatable
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
33 syn match hamlSelfCloser "/" contained
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
34 syn match hamlClassChar "\." contained nextgroup=hamlClass
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
35 syn match hamlIdChar "#" contained nextgroup=hamlId
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
36 syn match hamlClass "\%(\w\|-\)\+" contained nextgroup=@hamlComponent
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
37 syn match hamlId "\%(\w\|-\)\+" contained nextgroup=@hamlComponent
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
38 syn region hamlDocType start="^\s*!!!" end="$"
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
39
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
40 syn region hamlRuby matchgroup=hamlRubyOutputChar start="[=~]" end="$" contained contains=@hamlRubyTop keepend
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
41 syn region hamlRuby matchgroup=hamlRubyChar start="-" end="$" contained contains=@hamlRubyTop keepend
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
42 syn match hamlPlainChar "\\" contained
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
43 syn region hamlInterpolatable matchgroup=hamlInterpolatableChar start="==" end="$" keepend contained contains=hamlInterpolation
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
44 syn region hamlInterpolation matchgroup=hamlInterpolationDelimiter start="#{" end="}" contained contains=@hamlRubyTop
1702
5232b9862f23 updated for version 7.2-000
vimboss
parents: 1668
diff changeset
45 syn region hamlErbInterpolation matchgroup=hamlInterpolationDelimiter start="<%[=-]\=" end="-\=%>" contained contains=@hamlRubyTop
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
46
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
47 syn match hamlHelper "\<action_view?\|\.\@<!\<\%(flatten\|open\|puts\)" contained containedin=@hamlEmbeddedRuby,@hamlRubyTop,rubyInterpolation
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
48 syn keyword hamlHelper capture_haml find_and_preserve html_attrs init_haml_helpers list_of preced preserve succeed surround tab_down tab_up page_class contained containedin=@hamlEmbeddedRuby,@hamlRubyTop,rubyInterpolation
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
49
1702
5232b9862f23 updated for version 7.2-000
vimboss
parents: 1668
diff changeset
50 syn cluster hamlHtmlTop contains=@htmlTop,htmlBold,htmlItalic,htmlUnderline
5232b9862f23 updated for version 7.2-000
vimboss
parents: 1668
diff changeset
51 syn region hamlPlainFilter matchgroup=hamlFilter start="^\z(\s*\):\%(plain\|preserve\|erb\|redcloth\|textile\|markdown\)\s*$" end="^\%(\z1 \)\@!" contains=@hamlHtmlTop,rubyInterpolation
5232b9862f23 updated for version 7.2-000
vimboss
parents: 1668
diff changeset
52 syn region hamlEscapedFilter matchgroup=hamlFilter start="^\z(\s*\):\%(escaped\)\s*$" end="^\%(\z1 \)\@!" contains=rubyInterpolation
5232b9862f23 updated for version 7.2-000
vimboss
parents: 1668
diff changeset
53 syn region hamlErbFilter matchgroup=hamlFilter start="^\z(\s*\):erb\s*$" end="^\%(\z1 \)\@!" contains=@hamlHtmlTop,hamlErbInterpolation
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
54 syn region hamlRubyFilter matchgroup=hamlFilter start="^\z(\s*\):ruby\s*$" end="^\%(\z1 \)\@!" contains=@hamlRubyTop
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
55 syn region hamlSassFilter matchgroup=hamlFilter start="^\z(\s*\):sass\s*$" end="^\%(\z1 \)\@!" contains=@hamlSassTop
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
56
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
57 syn region hamlJavascriptBlock start="^\z(\s*\)%script" nextgroup=@hamlComponent,hamlError end="^\%(\z1 \)\@!" contains=@hamlTop,@htmlJavaScript keepend
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
58 syn region hamlCssBlock start="^\z(\s*\)%style" nextgroup=@hamlComponent,hamlError end="^\%(\z1 \)\@!" contains=@hamlTop,@htmlCss keepend
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
59 syn match hamlError "\$" contained
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
60
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
61 syn region hamlComment start="^\z(\s*\)-#" end="^\%(\z1 \)\@!" contains=rubyTodo
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
62 syn region hamlHtmlComment start="^\z(\s*\)/" end="^\%(\z1 \)\@!" contains=@hamlTop,rubyTodo
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
63 syn match hamlIEConditional "\%(^\s*/\)\@<=\[if\>[^]]*]" contained containedin=hamlHtmlComment
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
64
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
65 hi def link hamlSelfCloser Special
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
66 hi def link hamlDespacer Special
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
67 hi def link hamlClassChar Special
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
68 hi def link hamlIdChar Special
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
69 hi def link hamlTag Special
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
70 hi def link hamlClass Type
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
71 hi def link hamlId Identifier
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
72 hi def link hamlPlainChar Special
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
73 hi def link hamlInterpolatableChar hamlRubyChar
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
74 hi def link hamlRubyOutputChar hamlRubyChar
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
75 hi def link hamlRubyChar Special
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
76 hi def link hamlInterpolationDelimiter Delimiter
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
77 hi def link hamlDocType PreProc
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
78 hi def link hamlFilter PreProc
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
79 hi def link hamlAttributesDelimiter Delimiter
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
80 hi def link hamlObjectDelimiter Delimiter
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
81 hi def link hamlHelper Function
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
82 hi def link hamlHtmlComment hamlComment
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
83 hi def link hamlComment Comment
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
84 hi def link hamlIEConditional SpecialComment
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
85 hi def link hamlError Error
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
86
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
87 let b:current_syntax = "haml"
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
88
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
89 " vim:set sw=2: