Permalink
Browse files

added with, each, partial snippets. make syntax highlighting more inc…

…lusive.
  • Loading branch information...
1 parent be7a5e3 commit 037c2ab533a8b41628b04d3c6fcd3f50bc059519 @nrw committed Jul 12, 2012
Showing with 27 additions and 9 deletions.
  1. +0 −1 .gitignore
  2. +3 −3 Handlebars.JSON-tmLanguage
  3. +5 −5 Handlebars.tmLanguage
  4. +7 −0 each.sublime-snippet
  5. +5 −0 partial.sublime-snippet
  6. +7 −0 with.sublime-snippet
View
@@ -1,2 +1 @@
-*.tmLanguage.cache
*.cache
@@ -9,9 +9,9 @@
"patterns": [
{ "include": "#comments" },
- { "include": "#partial_and_var" },
{ "include": "#block_helper" },
{ "include": "#end_block" },
+ { "include": "#partial_and_var" },
{ "include": "#html_tags" }
],
"repository": {
@@ -32,7 +32,7 @@
},
"partial_and_var": {
"name": "meta.function.inline.other.handlebars",
- "begin": "(\\{\\{\\{*>*)\\s*([a-zA-Z_-]+)",
+ "begin": "(\\{\\{\\{*>*)\\s*([a-zA-Z_-]+)*",
"end": "(\\}\\}\\}*)",
"beginCaptures": {
"1": { "name": "support.constant.handlebars" },
@@ -46,7 +46,7 @@
},
"block_helper": {
"name": "meta.function.block.start.handlebars.sproutcore",
- "begin": "(\\{\\{\\#)([a-zA-Z_-]+)\\s+([a-zA-Z_-]+)",
+ "begin": "(\\{\\{\\#)([a-zA-Z_-]+)\\s*([a-zA-Z_-]+)*",
"end": "(\\}\\})",
"beginCaptures": {
View
@@ -21,15 +21,15 @@
</dict>
<dict>
<key>include</key>
- <string>#partial_and_var</string>
+ <string>#block_helper</string>
</dict>
<dict>
<key>include</key>
- <string>#block_helper</string>
+ <string>#end_block</string>
</dict>
<dict>
<key>include</key>
- <string>#end_block</string>
+ <string>#partial_and_var</string>
</dict>
<dict>
<key>include</key>
@@ -41,7 +41,7 @@
<key>block_helper</key>
<dict>
<key>begin</key>
- <string>(\{\{\#)([a-zA-Z_-]+)\s+([a-zA-Z_-]+)</string>
+ <string>(\{\{\#)([a-zA-Z_-]+)\s*([a-zA-Z_-]+)*</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
@@ -400,7 +400,7 @@
<key>partial_and_var</key>
<dict>
<key>begin</key>
- <string>(\{\{\{*&gt;*)\s*([a-zA-Z_-]+)</string>
+ <string>(\{\{\{*&gt;*)\s*([a-zA-Z_-]+)*</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
View
@@ -0,0 +1,7 @@
+<snippet>
+ <content><![CDATA[{{#each ${1}}}
+ ${2}
+{{/each}}]]></content>
+ <tabTrigger>each</tabTrigger>
+ <scope>source.handlebars</scope>
+</snippet>
View
@@ -0,0 +1,5 @@
+<snippet>
+ <content>{{> ${1}}}</content>
+ <tabTrigger>par</tabTrigger>
+ <scope>source.handlebars</scope>
+</snippet>
View
@@ -0,0 +1,7 @@
+<snippet>
+ <content><![CDATA[{{#with ${1}}}
+ ${2}
+{{/with}}]]></content>
+ <tabTrigger>with</tabTrigger>
+ <scope>source.handlebars</scope>
+</snippet>

0 comments on commit 037c2ab

Please sign in to comment.