├── .gitignore
├── messages.json
├── screenshot.png
├── messages
└── 1.0.0.txt
├── snippets
├── include.sublime-snippet
├── if.sublime-snippet
├── loop.sublime-snippet
├── with.sublime-snippet
├── control.sublime-snippet
├── ifelse.sublime-snippet
├── ifloop.sublime-snippet
├── ifwith.sublime-snippet
├── ifelseif.sublime-snippet
├── gridfieldrecordeditor.sublime-snippet
├── gridfieldrelationeditor.sublime-snippet
└── pagination.sublime-snippet
├── Comments.tmPreferences
├── README.md
├── demo-template.ss
├── SilverStripe.tmLanguage.JSON
└── SilverStripe.tmLanguage
/.gitignore:
--------------------------------------------------------------------------------
1 | *.cache
2 | .DS_Store
--------------------------------------------------------------------------------
/messages.json:
--------------------------------------------------------------------------------
1 | {
2 | "1.0.0": "messages/1.0.0.txt"
3 | }
4 |
--------------------------------------------------------------------------------
/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/benjamin-smith/sublime-text-silverstripe/HEAD/screenshot.png
--------------------------------------------------------------------------------
/messages/1.0.0.txt:
--------------------------------------------------------------------------------
1 | SilverStripe Templates has been upgraded!
2 | =========================================
3 |
4 | Version 1.0 Release Notes
5 |
6 | -- add JS & CSS highlighting support
7 | -- add `<%t` function support
8 | -- Several bug fixes
9 |
--------------------------------------------------------------------------------
/snippets/include.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 | ]]>
3 | include
4 | text.html.ss
5 | SilverStripe include statement
6 |
--------------------------------------------------------------------------------
/snippets/if.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 | ${2:content}
4 | <% end_if %>]]>
5 | if
6 | text.html.ss
7 | SilverStripe if statement
8 |
--------------------------------------------------------------------------------
/snippets/loop.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 | ${2:content}
4 | <% end_loop %>]]>
5 | loop
6 | text.html.ss
7 | SilverStripe loop statement
8 |
--------------------------------------------------------------------------------
/snippets/with.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 | ${2:content}
4 | <% end_with %>]]>
5 | with
6 | text.html.ss
7 | SilverStripe with statement
8 |
--------------------------------------------------------------------------------
/snippets/control.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 | ${2:content}
4 | <% end_control %>]]>
5 | control
6 | text.html.ss
7 | SilverStripe control statement
8 |
--------------------------------------------------------------------------------
/snippets/ifelse.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 | ${2:true}
4 | <% else %>
5 | ${3:false}
6 | <% end_if %>]]>
7 | ifelse
8 | text.html.ss
9 | SilverStripe if/else statement
10 |
--------------------------------------------------------------------------------
/snippets/ifloop.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 | <% loop ${1:condition} %>
4 | <% end_loop %>
5 | <% end_if %>]]>
6 | ifloop
7 | text.html.ss
8 | SilverStripe if statement with loop statement
9 |
--------------------------------------------------------------------------------
/snippets/ifwith.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 | <% with ${1:condition} %>
4 | <% end_with %>
5 | <% end_if %>]]>
6 | ifwith
7 | text.html.ss
8 | SilverStripe if statement with with statement
9 |
--------------------------------------------------------------------------------
/snippets/ifelseif.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
3 | ${2:true}
4 | <% else_if ${3:other_condition} %>
5 | ${4:true}
6 | <% else %>
7 | ${5:false}
8 | <% end_if %>]]>
9 | ifelseif
10 | text.html.ss
11 | SilverStripe if/else_if/else statement
12 |
--------------------------------------------------------------------------------
/snippets/gridfieldrecordeditor.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 | ${1:Name}();
4 | \$gridField = new GridField('${1:Name}', '${1:Name}', \$list, \$gridFieldConfig);
5 | \$fields->addFieldToTab('Root.${1:Name}', \$gridField);]]>
6 | gridfieldrecordeditor
7 | source.php
8 | SilverStripe GridField record editor
9 |
--------------------------------------------------------------------------------
/snippets/gridfieldrelationeditor.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 | ${1:Name}();
4 | \$gridField = new GridField('${1:Name}', '${1:Name}', \$list, \$gridFieldConfig);
5 | \$fields->addFieldToTab('Root.${1:Name}', \$gridField);]]>
6 | gridfieldrelationeditor
7 | source.php
8 | SilverStripe GridField relation editor
9 |
--------------------------------------------------------------------------------
/Comments.tmPreferences:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | name
6 | Comments
7 | scope
8 | text.html.ss
9 | settings
10 |
11 | shellVariables
12 |
13 |
14 | name
15 | TM_COMMENT_START
16 | value
17 | <%--
18 |
19 |
20 | name
21 | TM_COMMENT_END
22 | value
23 | --%>
24 |
25 |
26 |
27 | uuid
28 | 50817977-d606-49e2-a405-50a44a262e8d
29 |
30 |
31 |
--------------------------------------------------------------------------------
/snippets/pagination.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
4 | <% if \$${1:PaginatedPages}.NotFirstPage %>
5 | Prev
6 | <% end_if %>
7 | <% loop \$${1:PaginatedPages}.Pages %>
8 | <% if \$CurrentBool %>
9 | \$PageNum
10 | <% else %>
11 | <% if \$Link %>
12 | \$PageNum
13 | <% else %>
14 | ...
15 | <% end_if %>
16 | <% end_if %>
17 | <% end_loop %>
18 | <% if \$${1:PaginatedPages}.NotLastPage %>
19 | Next
20 | <% end_if %>
21 | <% end_if %>
22 | ]]>
23 | pagination
24 | text.html.ss
25 | My Fancy Snippet
26 |
27 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Sublime Text SilverStripe Package
2 |
3 | SS versions 4, 3, and 2 are supported. Works with Sublime Text v2/3.
4 |
5 | ## Features
6 |
7 | 
8 |
9 | * Syntax highlighting for .ss files
10 | * Highlights SS markup within HTML attributes
11 | * High contrast colors against surrounding HTML markup
12 | * Support for Emmet
13 | * Snippets for template files and PHP code
14 |
15 | ## Installation
16 |
17 | With [Package Control](http://wbond.net/sublime_packages/package_control) (recommended):
18 |
19 | 1. Run "Package Control: Install Package" command, find and install `SilverStripe` plugin.
20 | 2. Restart Sublime Text
21 |
22 | ## Snippets
23 |
24 | Press tab after typing any of the following to generate markup:
25 |
26 | **Template files**
27 |
28 | * `if`
29 | * `ifelse`
30 | * `ifelseif`
31 | * `control`
32 | * `loop`
33 | * `with`
34 | * `include`
35 | * `ifloop`
36 | * `ifwith`
37 | * `pagination`
38 |
39 | **PHP code**
40 |
41 | * `gridfieldrecordeditor`
42 | * `gridfieldrelationeditor`
43 |
44 | ## Credits
45 |
46 | MUCH inspiration came from [nrw's Handlebars ST2 package](https://github.com/nrw/sublime-text-handlebars).
47 |
--------------------------------------------------------------------------------
/demo-template.ss:
--------------------------------------------------------------------------------
1 |
2 |
3 | <% base_tag %>
4 | $Title
5 | <% require themedCSS('LeftNavMenu') %>
6 | $MetaTagsdiv
7 |
10 |
11 |
12 |
13 |
16 |
17 | <% if Menu(1) %>
18 |
19 | <% control Menu(1) %>
20 | - $MenuTitle
21 | <% end_control %>
22 |
23 | <% end_if %>
24 |
25 |
26 |
27 | <%-- Properties --%>
28 |
29 | $Property
30 | $Property(param)
31 | $Property.SubProperty
32 | {$Property}
33 | {$Property(param)}
34 | {$Property.SubProperty}
35 |
36 | <%-- Includes --%>
37 |
38 | <% include SideBar %>
39 |
40 | <%-- Controls --%>
41 |
42 | <% control Property %>
43 | ... content ...
44 | <% end_control %>
45 |
46 | <% control Property.SubProperty %>
47 | ... content ...
48 | <% end_control %>
49 |
50 | <% control Property(param) %>
51 | ... content ...
52 | <% end_control %>
53 |
54 | <% control Menu(1) %>
55 |
$Title
56 | <% end_control %>
57 |
58 | <%-- Conditionals --%>
59 |
60 | <% if Property %>
61 | ... optional content ...
62 | <% else_if OtherProperty %>
63 | ... alternative content ...
64 | <% else %>
65 | ... alternative content ...
66 | <% end_if %>
67 |
68 | <% if Property == value %>
69 | <% else %>
70 | <% end_if %>
71 |
72 | <% if Property != value %>
73 | <% end_if %>
74 |
75 | <% if Property && Property2 %>
76 | <% end_if %>
77 |
78 | <% if Property || Property2 %>
79 | <% end_if %>
80 |
81 | <%-- Partial Caching --%>
82 |
83 | <% cacheblock 'slowoperation', LastEdited %>
84 | $SlowOperation
85 | <% end_cacheblock %>
86 |
87 | <%-- i18n --%>
88 | <%t Column.PluralTitle "Columns" %>
89 |
90 |
91 |
94 |
95 |
96 |
99 |
100 |
101 |
102 |
--------------------------------------------------------------------------------
/SilverStripe.tmLanguage.JSON:
--------------------------------------------------------------------------------
1 | {
2 | "name": "SilverStripe",
3 | "uuid": "9b9e9065-622f-479d-82f1-6c403382e932",
4 | "scopeName": "text.html.ss",
5 | "fileTypes": ["ss"],
6 | "patterns": [
7 | { "include": "#comments" },
8 | { "include": "#include" },
9 | { "include": "#conditional" },
10 | { "include": "#single_control" },
11 | { "include": "#single_var" },
12 | { "include": "#i18n" },
13 | { "include": "#partial_caching" },
14 | { "include": "#html_tags" },
15 | { "include": "#css" },
16 | { "include": "#javascript" }
17 | ],
18 | "repository": {
19 | "comments": {
20 | "patterns": [
21 | {
22 | "name": "comment.block.ss",
23 | "begin": "(<%\\-\\-)",
24 | "end": "(\\-\\-%>)",
25 | "beginCaptures": {
26 | "1": { "name": "punctuation.definition.comment.ss" }
27 | },
28 | "endCaptures": {
29 | "1": { "name": "punctuation.definition.comment.ss" }
30 | },
31 | "patterns": [
32 | { "match": "." },
33 | { "name": "invalid.illegal.bad-comments-or-CDATA.ss"}
34 | ]
35 | }
36 | ]
37 | },
38 | "conditional": {
39 | "patterns": [
40 | {
41 | "name": "source.ss.embedded.conditional",
42 | "begin": "(<%\\s)(else_if|if\\snot|if)\\s",
43 | "end": "(\\s*%>)",
44 | "beginCaptures": {
45 | "1": { "name": "support.constant.ss" },
46 | "2": { "name": "support.function.ss" }
47 | },
48 | "endCaptures": {
49 | "1": { "name": "support.constant.ss" }
50 | },
51 | "patterns": [
52 | {
53 | "match": "(=|!=|&&|\\|)",
54 | "name": "support.constant.ss"
55 | },
56 | {
57 | "match": "([a-zA-Z0-9_\\(\\)\\$\"])",
58 | "name": "variable.parameter.ss"
59 | }
60 | ],
61 | "comment": "Conditional stements (if/if_else/if not)"
62 | }
63 | ]
64 | },
65 | "single_control": {
66 | "patterns": [
67 | {
68 | "name": "source.ss.embedded.block",
69 | "match": "(<%\\s)(else|end_if|control|end_control|with|end_with|Loop|end_Loop|loop|end_loop|base_tag|require|cacheblock|end_cacheblock|cached|end_cached|uncached|end_uncached)(.*)(\\s%>)",
70 | "captures": {
71 | "1": { "name": "support.constant.ss" },
72 | "2": { "name": "support.function.ss" },
73 | "3": { "name": "variable.parameter.ss" },
74 | "4": { "name": "support.constant.ss" }
75 | },
76 | "comment": "Single control keywords"
77 | }
78 | ]
79 | },
80 | "i18n": {
81 | "patterns": [
82 | {
83 | "name": "source.ss.embedded.i18n",
84 | "match": "(<%t)(.*)(\\s%>)",
85 | "captures": {
86 | "1": { "name": "support.constant.ss" },
87 | "2": { "name": "variable.parameter.ss" },
88 | "3": { "name": "support.constant.ss" }
89 | },
90 | "comment": "Translatable text tags"
91 | }
92 | ]
93 | },
94 | "partial_caching": {
95 | "patterns": [
96 | { "match": "(<%\\s)(cacheblock|cached)\\s?('[a-zA-Z0-9]*?')?\\s?(,\\s?[a-zA-Z0-9]*?)?(\\s%>)",
97 | "name": "source.ss.embedded.block",
98 | "captures": {
99 | "1": { "name": "support.constant.ss" },
100 | "2": { "name": "support.function.ss" },
101 | "3": { "name": "variable.parameter.ss" },
102 | "4": { "name": "variable.parameter.ss" },
103 | "5": { "name": "support.constant.ss" }
104 | },
105 | "comment": "Special partial caching syntax"
106 | }
107 | ]
108 | },
109 | "single_var": {
110 | "patterns": [
111 | { "match": "(\\{)?(\\$)([a-zA-Z0-9\\._]*)(\\(?)([a-zA-Z0-9_\\-,\\s]*)?(\\)?)(\\})?",
112 | "name": "variable.parameter.ss",
113 | "comment": "SS custom Variables"
114 | }
115 | ]
116 | },
117 | "include": {
118 | "patterns": [
119 | {
120 | "name": "source.ss.embedded.include",
121 | "begin": "(<%)\\s+(include)",
122 | "end": "(%>)",
123 | "beginCaptures": {
124 | "1": { "name": "support.constant.ss" },
125 | "2": { "name": "support.function.ss" }
126 | },
127 | "endCaptures": {
128 | "1": { "name": "support.constant.ss" }
129 | },
130 | "patterns": [
131 | {
132 | "match": "([a-zA-Z0-9_\\.=]*)",
133 | "name": "variable.parameter.ss",
134 | "captures": {
135 | "1": { "name": "variable.parameter.ss" }
136 | }
137 | },
138 | {
139 | "include": "#single_var"
140 | }
141 | ]
142 | }
143 | ]
144 | },
145 |
146 |
147 | "css": {
148 | "begin": "(?:^\\s+)?(<)((?i:style))\\b(?![^>]*/>)",
149 | "captures": {
150 | "1": {
151 | "name": "punctuation.definition.tag.html"
152 | },
153 | "2": {
154 | "name": "entity.name.tag.style.html"
155 | },
156 | "3": {
157 | "name": "punctuation.definition.tag.html"
158 | }
159 | },
160 | "end": "()((?i:style))(>)(?:\\s*\\n)?",
161 | "name": "source.css.embedded.html",
162 | "patterns": [
163 | {
164 | "include": "#tag-stuff"
165 | },
166 | {
167 | "begin": "(>)",
168 | "beginCaptures": {
169 | "1": {
170 | "name": "punctuation.definition.tag.html"
171 | }
172 | },
173 | "end": "(?=(?i:style))",
174 | "patterns": [
175 | {
176 | "include": "#embedded-code"
177 | },
178 | {
179 | "include": "source.css"
180 | }
181 | ]
182 | }
183 | ]
184 | },
185 | "javascript": {
186 | "begin": "(?:^\\s+)?(<)((?i:script))\\b(?![^>]*/>)",
187 | "beginCaptures": {
188 | "1": {
189 | "name": "punctuation.definition.tag.html"
190 | },
191 | "2": {
192 | "name": "entity.name.tag.script.html"
193 | }
194 | },
195 | "end": "(?<=(script|SCRIPT))(>)(?:\\s*\\n)?",
196 | "endCaptures": {
197 | "2": {
198 | "name": "punctuation.definition.tag.html"
199 | }
200 | },
201 | "name": "source.js.embedded.html",
202 | "patterns": [
203 | {
204 | "include": "#tag-stuff"
205 | },
206 | {
207 | "begin": "(?)",
208 | "captures": {
209 | "1": {
210 | "name": "punctuation.definition.tag.html"
211 | },
212 | "2": {
213 | "name": "entity.name.tag.script.html"
214 | }
215 | },
216 | "end": "()((?i:script))",
217 | "patterns": [
218 | {
219 | "captures": {
220 | "1": {
221 | "name": "punctuation.definition.comment.js"
222 | }
223 | },
224 | "match": "(//).*?((?=)",
347 | "beginCaptures": {
348 | "1": { "name": "punctuation.definition.comment.html" }
349 | },
350 | "endCaptures": {
351 | "1": { "name": "punctuation.definition.comment.html" }
352 | },
353 | "patterns": [
354 | { "match": "." },
355 | { "name": "invalid.illegal.bad-comments-or-CDATA.html"}
356 | ]
357 | },
358 | {
359 | "name": "meta.tag.any.html",
360 | "begin": "(<)([a-zA-Z0-9:]++)(?=[^>]*>\\2>)",
361 | "end": "(>)(<)(/)(\\2)(>)",
362 | "beginCaptures": {
363 | "1": { "name": "punctuation.definition.tag.begin.html" },
364 | "2": { "name": "entity.name.tag.html" }
365 | },
366 | "endCaptures": {
367 | "1": { "name": "punctuation.definition.tag.end.html" },
368 | "2": { "name": "punctuation.definition.tag.begin.html meta.scope.between-tag-pair.html" },
369 | "3": { "name": "punctuation.definition.tag.begin.html" },
370 | "4": { "name": "entity.name.tag.html" },
371 | "5": { "name": "punctuation.definition.tag.end.html" }
372 | },
373 | "patterns": [
374 | { "include": "#tag_stuff" }
375 | ]
376 | },
377 | {
378 | "name": "meta.tag.structure.any.html",
379 | "begin": "(?)((?i:body|head|html)\\b)",
380 | "end": "(>)",
381 | "captures": {
382 | "1": { "name": "punctuation.definition.tag.begin.html" },
383 | "2": { "name": "entity.name.tag.structure.any.html" }
384 | },
385 | "endCaptures": { "1": { "name": "punctuation.definition.tag.end.html" } },
386 | "patterns": [ { "include": "#tag_stuff" } ]
387 | },
388 | {
389 | "name": "meta.tag.block.any.html",
390 | "begin": "(?)((?i:address|blockquote|dd|div|dl|dt|fieldset|form|frame|frameset|h1|h2|h3|h4|h5|h6|iframe|noframes|object|ol|p|ul|applet|center|dir|hr|menu|pre)\\b)",
391 | "end": "(>)",
392 | "beginCaptures": {
393 | "1": { "name": "punctuation.definition.tag.begin.html" },
394 | "2": { "name": "entity.name.tag.block.any.html" }
395 | },
396 | "endCaptures": { "1": { "name": "punctuation.definition.tag.end.html" } },
397 | "patterns": [ { "include": "#tag_stuff" } ]
398 | },
399 | {
400 | "name": "meta.tag.inline.any.html",
401 | "begin": "(?)((?i:a|abbr|acronym|area|b|base|basefont|bdo|big|br|button|caption|cite|code|col|colgroup|del|dfn|em|font|head|html|i|img|input|ins|isindex|kbd|label|legend|li|link|map|meta|noscript|optgroup|option|param|q|s|samp|script|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|title|tr|tt|u|var)\\b)",
402 | "end": "((?: ?/)?>)",
403 | "beginCaptures": {
404 | "1": { "name": "punctuation.definition.tag.begin.html" },
405 | "2": { "name": "entity.name.tag.inline.any.html" }
406 | },
407 | "endCaptures": {
408 | "1": { "name": "punctuation.definition.tag.end.html" }
409 | },
410 | "patterns": [ { "include": "#tag_stuff" } ]
411 | },
412 | {
413 | "name": "meta.tag.other.html",
414 | "begin": "(?)([!a-zA-Z0-9:]+)",
415 | "end": "(>)",
416 | "beginCaptures": {
417 | "1": { "name": "punctuation.definition.tag.begin.html" },
418 | "2": { "name": "entity.name.tag.other.html" }
419 | },
420 | "endCaptures": { "1": { "name": "punctuation.definition.tag.end.html" } },
421 | "patterns": [
422 | { "include": "#tag_stuff" }
423 | ]
424 | },
425 | {
426 | "include": "#entities" },
427 | { "name": "invalid.illegal.incomplete.html",
428 | "match": "<>"
429 | },
430 | {
431 | "name": "invalid.illegal.bad-angle-bracket.html",
432 | "match": "<"
433 | }
434 | ]
435 | },
436 | "entities": {
437 | "patterns": [
438 | {
439 | "name": "constant.character.entity.html",
440 | "match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)",
441 | "captures": {
442 | "1": { "name": "punctuation.definition.entity.html" },
443 | "3": { "name": "punctuation.definition.entity.html" }
444 | }
445 | },
446 | {
447 | "name": "invalid.illegal.bad-ampersand.html",
448 | "match": "&"
449 | }
450 | ]
451 | },
452 | "tag_stuff": {
453 | "patterns": [
454 | { "include": "#tag_id_attribute" },
455 | { "include": "#tag_generic_attribute" },
456 | { "include": "#string_double_quoted" },
457 | { "include": "#string_single_quoted" }
458 | ]
459 | }
460 | }
461 | }
462 |
--------------------------------------------------------------------------------
/SilverStripe.tmLanguage:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | fileTypes
6 |
7 | ss
8 |
9 | name
10 | SilverStripe
11 | patterns
12 |
13 |
14 | include
15 | #comments
16 |
17 |
18 | include
19 | #include
20 |
21 |
22 | include
23 | #conditional
24 |
25 |
26 | include
27 | #single_control
28 |
29 |
30 | include
31 | #single_var
32 |
33 |
34 | include
35 | #i18n
36 |
37 |
38 | include
39 | #partial_caching
40 |
41 |
42 | include
43 | #html_tags
44 |
45 |
46 | include
47 | #css
48 |
49 |
50 | include
51 | #javascript
52 |
53 |
54 | repository
55 |
56 | comments
57 |
58 | patterns
59 |
60 |
61 | begin
62 | (<%\-\-)
63 | beginCaptures
64 |
65 | 1
66 |
67 | name
68 | punctuation.definition.comment.ss
69 |
70 |
71 | end
72 | (\-\-%>)
73 | endCaptures
74 |
75 | 1
76 |
77 | name
78 | punctuation.definition.comment.ss
79 |
80 |
81 | name
82 | comment.block.ss
83 | patterns
84 |
85 |
86 | match
87 | .
88 |
89 |
90 | name
91 | invalid.illegal.bad-comments-or-CDATA.ss
92 |
93 |
94 |
95 |
96 |
97 | conditional
98 |
99 | patterns
100 |
101 |
102 | begin
103 | (<%\s)(else_if|if\snot|if)\s
104 | beginCaptures
105 |
106 | 1
107 |
108 | name
109 | support.constant.ss
110 |
111 | 2
112 |
113 | name
114 | support.function.ss
115 |
116 |
117 | comment
118 | Conditional stements (if/if_else/if not)
119 | end
120 | (\s*%>)
121 | endCaptures
122 |
123 | 1
124 |
125 | name
126 | support.constant.ss
127 |
128 |
129 | name
130 | source.ss.embedded.conditional
131 | patterns
132 |
133 |
134 | match
135 | (=|!=|&&|\|)
136 | name
137 | support.constant.ss
138 |
139 |
140 | match
141 | ([a-zA-Z0-9_\(\)\$"])
142 | name
143 | variable.parameter.ss
144 |
145 |
146 |
147 |
148 |
149 | css
150 |
151 | begin
152 | (?:^\s+)?(<)((?i:style))\b(?![^>]*/>)
153 | captures
154 |
155 | 1
156 |
157 | name
158 | punctuation.definition.tag.html
159 |
160 | 2
161 |
162 | name
163 | entity.name.tag.style.html
164 |
165 | 3
166 |
167 | name
168 | punctuation.definition.tag.html
169 |
170 |
171 | end
172 | (</)((?i:style))(>)(?:\s*\n)?
173 | name
174 | source.css.embedded.html
175 | patterns
176 |
177 |
178 | include
179 | #tag-stuff
180 |
181 |
182 | begin
183 | (>)
184 | beginCaptures
185 |
186 | 1
187 |
188 | name
189 | punctuation.definition.tag.html
190 |
191 |
192 | end
193 | (?=</(?i:style))
194 | patterns
195 |
196 |
197 | include
198 | #embedded-code
199 |
200 |
201 | include
202 | source.css
203 |
204 |
205 |
206 |
207 |
208 | entities
209 |
210 | patterns
211 |
212 |
213 | captures
214 |
215 | 1
216 |
217 | name
218 | punctuation.definition.entity.html
219 |
220 | 3
221 |
222 | name
223 | punctuation.definition.entity.html
224 |
225 |
226 | match
227 | (&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)
228 | name
229 | constant.character.entity.html
230 |
231 |
232 | match
233 | &
234 | name
235 | invalid.illegal.bad-ampersand.html
236 |
237 |
238 |
239 | html_tags
240 |
241 | patterns
242 |
243 |
244 | begin
245 | (<!--)
246 | beginCaptures
247 |
248 | 1
249 |
250 | name
251 | punctuation.definition.comment.html
252 |
253 |
254 | end
255 | (-->)
256 | endCaptures
257 |
258 | 1
259 |
260 | name
261 | punctuation.definition.comment.html
262 |
263 |
264 | name
265 | comment.block.html
266 | patterns
267 |
268 |
269 | match
270 | .
271 |
272 |
273 | name
274 | invalid.illegal.bad-comments-or-CDATA.html
275 |
276 |
277 |
278 |
279 | begin
280 | (<)([a-zA-Z0-9:]++)(?=[^>]*></\2>)
281 | beginCaptures
282 |
283 | 1
284 |
285 | name
286 | punctuation.definition.tag.begin.html
287 |
288 | 2
289 |
290 | name
291 | entity.name.tag.html
292 |
293 |
294 | end
295 | (>)(<)(/)(\2)(>)
296 | endCaptures
297 |
298 | 1
299 |
300 | name
301 | punctuation.definition.tag.end.html
302 |
303 | 2
304 |
305 | name
306 | punctuation.definition.tag.begin.html meta.scope.between-tag-pair.html
307 |
308 | 3
309 |
310 | name
311 | punctuation.definition.tag.begin.html
312 |
313 | 4
314 |
315 | name
316 | entity.name.tag.html
317 |
318 | 5
319 |
320 | name
321 | punctuation.definition.tag.end.html
322 |
323 |
324 | name
325 | meta.tag.any.html
326 | patterns
327 |
328 |
329 | include
330 | #tag_stuff
331 |
332 |
333 |
334 |
335 | begin
336 | (</?)((?i:body|head|html)\b)
337 | captures
338 |
339 | 1
340 |
341 | name
342 | punctuation.definition.tag.begin.html
343 |
344 | 2
345 |
346 | name
347 | entity.name.tag.structure.any.html
348 |
349 |
350 | end
351 | (>)
352 | endCaptures
353 |
354 | 1
355 |
356 | name
357 | punctuation.definition.tag.end.html
358 |
359 |
360 | name
361 | meta.tag.structure.any.html
362 | patterns
363 |
364 |
365 | include
366 | #tag_stuff
367 |
368 |
369 |
370 |
371 | begin
372 | (</?)((?i:address|blockquote|dd|div|dl|dt|fieldset|form|frame|frameset|h1|h2|h3|h4|h5|h6|iframe|noframes|object|ol|p|ul|applet|center|dir|hr|menu|pre)\b)
373 | beginCaptures
374 |
375 | 1
376 |
377 | name
378 | punctuation.definition.tag.begin.html
379 |
380 | 2
381 |
382 | name
383 | entity.name.tag.block.any.html
384 |
385 |
386 | end
387 | (>)
388 | endCaptures
389 |
390 | 1
391 |
392 | name
393 | punctuation.definition.tag.end.html
394 |
395 |
396 | name
397 | meta.tag.block.any.html
398 | patterns
399 |
400 |
401 | include
402 | #tag_stuff
403 |
404 |
405 |
406 |
407 | begin
408 | (</?)((?i:a|abbr|acronym|area|b|base|basefont|bdo|big|br|button|caption|cite|code|col|colgroup|del|dfn|em|font|head|html|i|img|input|ins|isindex|kbd|label|legend|li|link|map|meta|noscript|optgroup|option|param|q|s|samp|script|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|title|tr|tt|u|var)\b)
409 | beginCaptures
410 |
411 | 1
412 |
413 | name
414 | punctuation.definition.tag.begin.html
415 |
416 | 2
417 |
418 | name
419 | entity.name.tag.inline.any.html
420 |
421 |
422 | end
423 | ((?: ?/)?>)
424 | endCaptures
425 |
426 | 1
427 |
428 | name
429 | punctuation.definition.tag.end.html
430 |
431 |
432 | name
433 | meta.tag.inline.any.html
434 | patterns
435 |
436 |
437 | include
438 | #tag_stuff
439 |
440 |
441 |
442 |
443 | begin
444 | (</?)([!a-zA-Z0-9:]+)
445 | beginCaptures
446 |
447 | 1
448 |
449 | name
450 | punctuation.definition.tag.begin.html
451 |
452 | 2
453 |
454 | name
455 | entity.name.tag.other.html
456 |
457 |
458 | end
459 | (>)
460 | endCaptures
461 |
462 | 1
463 |
464 | name
465 | punctuation.definition.tag.end.html
466 |
467 |
468 | name
469 | meta.tag.other.html
470 | patterns
471 |
472 |
473 | include
474 | #tag_stuff
475 |
476 |
477 |
478 |
479 | include
480 | #entities
481 |
482 |
483 | match
484 | <>
485 | name
486 | invalid.illegal.incomplete.html
487 |
488 |
489 | match
490 | <
491 | name
492 | invalid.illegal.bad-angle-bracket.html
493 |
494 |
495 |
496 | i18n
497 |
498 | patterns
499 |
500 |
501 | captures
502 |
503 | 1
504 |
505 | name
506 | support.constant.ss
507 |
508 | 2
509 |
510 | name
511 | variable.parameter.ss
512 |
513 | 3
514 |
515 | name
516 | support.constant.ss
517 |
518 |
519 | comment
520 | Translatable text tags
521 | match
522 | (<%t)(.*)(\s%>)
523 | name
524 | source.ss.embedded.i18n
525 |
526 |
527 |
528 | include
529 |
530 | patterns
531 |
532 |
533 | begin
534 | (<%)\s+(include)
535 | beginCaptures
536 |
537 | 1
538 |
539 | name
540 | support.constant.ss
541 |
542 | 2
543 |
544 | name
545 | support.function.ss
546 |
547 |
548 | end
549 | (%>)
550 | endCaptures
551 |
552 | 1
553 |
554 | name
555 | support.constant.ss
556 |
557 |
558 | name
559 | source.ss.embedded.include
560 | patterns
561 |
562 |
563 | captures
564 |
565 | 1
566 |
567 | name
568 | variable.parameter.ss
569 |
570 |
571 | match
572 | ([a-zA-Z0-9_\.=]*)
573 | name
574 | variable.parameter.ss
575 |
576 |
577 | include
578 | #single_var
579 |
580 |
581 |
582 |
583 |
584 | javascript
585 |
586 | begin
587 | (?:^\s+)?(<)((?i:script))\b(?![^>]*/>)
588 | beginCaptures
589 |
590 | 1
591 |
592 | name
593 | punctuation.definition.tag.html
594 |
595 | 2
596 |
597 | name
598 | entity.name.tag.script.html
599 |
600 |
601 | end
602 | (?<=</(script|SCRIPT))(>)(?:\s*\n)?
603 | endCaptures
604 |
605 | 2
606 |
607 | name
608 | punctuation.definition.tag.html
609 |
610 |
611 | name
612 | source.js.embedded.html
613 | patterns
614 |
615 |
616 | include
617 | #tag-stuff
618 |
619 |
620 | begin
621 | (?<!</(?:script|SCRIPT))(>)
622 | captures
623 |
624 | 1
625 |
626 | name
627 | punctuation.definition.tag.html
628 |
629 | 2
630 |
631 | name
632 | entity.name.tag.script.html
633 |
634 |
635 | end
636 | (</)((?i:script))
637 | patterns
638 |
639 |
640 | captures
641 |
642 | 1
643 |
644 | name
645 | punctuation.definition.comment.js
646 |
647 |
648 | match
649 | (//).*?((?=</script)|$\n?)
650 | name
651 | comment.line.double-slash.js
652 |
653 |
654 | begin
655 | /\*
656 | captures
657 |
658 | 0
659 |
660 | name
661 | punctuation.definition.comment.js
662 |
663 |
664 | end
665 | \*/|(?=</script)
666 | name
667 | comment.block.js
668 |
669 |
670 | include
671 | #php
672 |
673 |
674 | include
675 | source.js
676 |
677 |
678 |
679 |
680 |
681 | partial_caching
682 |
683 | patterns
684 |
685 |
686 | captures
687 |
688 | 1
689 |
690 | name
691 | support.constant.ss
692 |
693 | 2
694 |
695 | name
696 | support.function.ss
697 |
698 | 3
699 |
700 | name
701 | variable.parameter.ss
702 |
703 | 4
704 |
705 | name
706 | variable.parameter.ss
707 |
708 | 5
709 |
710 | name
711 | support.constant.ss
712 |
713 |
714 | comment
715 | Special partial caching syntax
716 | match
717 | (<%\s)(cacheblock|cached)\s?('[a-zA-Z0-9]*?')?\s?(,\s?[a-zA-Z0-9]*?)?(\s%>)
718 | name
719 | source.ss.embedded.block
720 |
721 |
722 |
723 | single_control
724 |
725 | patterns
726 |
727 |
728 | captures
729 |
730 | 1
731 |
732 | name
733 | support.constant.ss
734 |
735 | 2
736 |
737 | name
738 | support.function.ss
739 |
740 | 3
741 |
742 | name
743 | variable.parameter.ss
744 |
745 | 4
746 |
747 | name
748 | support.constant.ss
749 |
750 |
751 | comment
752 | Single control keywords
753 | match
754 | (<%\s)(else|end_if|control|end_control|with|end_with|Loop|end_Loop|loop|end_loop|base_tag|require|cacheblock|end_cacheblock|cached|end_cached|uncached|end_uncached)(.*)(\s%>)
755 | name
756 | source.ss.embedded.block
757 |
758 |
759 |
760 | single_var
761 |
762 | patterns
763 |
764 |
765 | comment
766 | SS custom Variables
767 | match
768 | (\{)?(\$)([a-zA-Z0-9\._]*)(\(?)([a-zA-Z0-9_\-,\s]*)?(\)?)(\})?
769 | name
770 | variable.parameter.ss
771 |
772 |
773 |
774 | string_double_quoted
775 |
776 | begin
777 | "
778 | beginCaptures
779 |
780 | 0
781 |
782 | name
783 | punctuation.definition.string.begin.html
784 |
785 |
786 | end
787 | "
788 | endCaptures
789 |
790 | 0
791 |
792 | name
793 | punctuation.definition.string.end.html
794 |
795 |
796 | name
797 | string.quoted.double.html
798 | patterns
799 |
800 |
801 | include
802 | #comments
803 |
804 |
805 | include
806 | #include
807 |
808 |
809 | include
810 | #conditional
811 |
812 |
813 | include
814 | #single_control
815 |
816 |
817 | include
818 | #single_var
819 |
820 |
821 |
822 | string_single_quoted
823 |
824 | begin
825 | '
826 | beginCaptures
827 |
828 | 0
829 |
830 | name
831 | punctuation.definition.string.begin.html
832 |
833 |
834 | end
835 | '
836 | endCaptures
837 |
838 | 0
839 |
840 | name
841 | punctuation.definition.string.end.html
842 |
843 |
844 | name
845 | string.quoted.single.html
846 | patterns
847 |
848 |
849 | include
850 | #comments
851 |
852 |
853 | include
854 | #include
855 |
856 |
857 | include
858 | #conditional
859 |
860 |
861 | include
862 | #single_control
863 |
864 |
865 | include
866 | #single_var
867 |
868 |
869 |
870 | tag_generic_attribute
871 |
872 | match
873 | \b([a-zA-Z\-:]+)
874 | name
875 | entity.other.attribute-name.html
876 | patterns
877 |
878 |
879 | include
880 | #comments
881 |
882 |
883 | include
884 | #include
885 |
886 |
887 | include
888 | #conditional
889 |
890 |
891 | include
892 | #single_control
893 |
894 |
895 | include
896 | #single_var
897 |
898 |
899 |
900 | tag_id_attribute
901 |
902 | begin
903 | \b(id)\b\s*(=)
904 | captures
905 |
906 | 1
907 |
908 | name
909 | entity.other.attribute-name.id.html
910 |
911 | 2
912 |
913 | name
914 | punctuation.separator.key-value.html
915 |
916 |
917 | end
918 | (?<=''|")
919 | name
920 | meta.attribute-with-value.id.html
921 | patterns
922 |
923 |
924 | begin
925 | "
926 | beginCaptures
927 |
928 | 0
929 |
930 | name
931 | punctuation.definition.string.begin.html
932 |
933 |
934 | contentName
935 | meta.toc-list.id.html
936 | end
937 | "
938 | endCaptures
939 |
940 | 0
941 |
942 | name
943 | punctuation.definition.string.end.html
944 |
945 |
946 | name
947 | string.quoted.double.html
948 | patterns
949 |
950 |
951 | include
952 | #partial_and_var
953 |
954 |
955 |
956 |
957 | begin
958 | '
959 | beginCaptures
960 |
961 | 0
962 |
963 | name
964 | punctuation.definition.string.begin.html
965 |
966 |
967 | contentName
968 | meta.toc-list.id.html
969 | end
970 | '
971 | endCaptures
972 |
973 | 0
974 |
975 | name
976 | punctuation.definition.string.end.html
977 |
978 |
979 | name
980 | string.quoted.single.html
981 | patterns
982 |
983 |
984 | include
985 | #comments
986 |
987 |
988 | include
989 | #include
990 |
991 |
992 | include
993 | #conditional
994 |
995 |
996 | include
997 | #single_control
998 |
999 |
1000 | include
1001 | #single_var
1002 |
1003 |
1004 |
1005 |
1006 |
1007 | tag_stuff
1008 |
1009 | patterns
1010 |
1011 |
1012 | include
1013 | #tag_id_attribute
1014 |
1015 |
1016 | include
1017 | #tag_generic_attribute
1018 |
1019 |
1020 | include
1021 | #string_double_quoted
1022 |
1023 |
1024 | include
1025 | #string_single_quoted
1026 |
1027 |
1028 |
1029 |
1030 | scopeName
1031 | text.html.ss
1032 | uuid
1033 | 9b9e9065-622f-479d-82f1-6c403382e932
1034 |
1035 |
1036 |
--------------------------------------------------------------------------------