Skip to content

Commit

Permalink
add snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
cedeber committed May 16, 2017
1 parent 26d0769 commit 1603e40
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Sublime Mustache

Mustache Syntax Definitions for Sublime Text
Mustache Syntax Definitions and Snippets for Sublime Text 3
8 changes: 8 additions & 0 deletions snippets/comment.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<snippet>
<content><![CDATA[
{{! ${1:comment} }}
]]></content>
<tabTrigger>!</tabTrigger>
<description>Mustache Comment</description>
<scope>embedding.mustache</scope>
</snippet>
11 changes: 11 additions & 0 deletions snippets/else.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

<snippet>
<content><![CDATA[
{{^ ${1:variable} }}
<!-- ${0:code...} -->
{{/ ${1:variable} }}
]]></content>
<tabTrigger>else</tabTrigger>
<description>Mustache Inverted Section</description>
<scope>embedding.mustache</scope>
</snippet>
11 changes: 11 additions & 0 deletions snippets/if.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

<snippet>
<content><![CDATA[
{{# ${1:variable} }}
<!-- ${0:code...} -->
{{/ ${1:variable} }}
]]></content>
<tabTrigger>if</tabTrigger>
<description>Mustache Section</description>
<scope>embedding.mustache</scope>
</snippet>
9 changes: 9 additions & 0 deletions snippets/partial.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

<snippet>
<content><![CDATA[
{{> ${1:partial} }}
]]></content>
<tabTrigger>inc</tabTrigger>
<description>Mustache Partial</description>
<scope>embedding.mustache</scope>
</snippet>
9 changes: 9 additions & 0 deletions snippets/safe-variable.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

<snippet>
<content><![CDATA[
{{{ ${1:variable} }}}
]]></content>
<tabTrigger>let</tabTrigger>
<description>Mustache Unescaped Variable</description>
<scope>embedding.mustache</scope>
</snippet>
9 changes: 9 additions & 0 deletions snippets/variable.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

<snippet>
<content><![CDATA[
{{ ${1:variable} }}
]]></content>
<tabTrigger>var</tabTrigger>
<description>Mustache Escaped Variable</description>
<scope>embedding.mustache</scope>
</snippet>

0 comments on commit 1603e40

Please sign in to comment.