-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split snippets into block- and tag-snippets
Adds snippets for individual tags so typing a tag name and hitting tab key expands to an individual tag enclosed in `{% ... %}`: if| => {% if | %} embed| => {% embed | %} Triggers of existing block snippets are prefixed with `b` to avoid ambiguities with tag-snippets. Otherwise it would be unclear whether blocks or tags are expanded and/or completion panel was displayed requiring arrow key navigation. bif| {% if conditon %} | {% endif %} Reorganize snippets in individual sub-directories in case someone wants to disable individual ones based on type.
- Loading branch information
deathaxe
committed
Oct 20, 2024
1 parent
567e3a1
commit 5020129
Showing
50 changed files
with
227 additions
and
53 deletions.
There are no files selected for viewing
6 changes: 3 additions & 3 deletions
6
Snippets/apply.sublime-snippet → Snippets/blocks/apply.sublime-snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
<snippet> | ||
<content><![CDATA[ | ||
{% apply $1 %} | ||
{% apply ${1:filter} %} | ||
${TM_TEMPLATE_INDENT}$0 | ||
{% endapply %} | ||
]]></content> | ||
<tabTrigger>apply</tabTrigger> | ||
<tabTrigger>bapply</tabTrigger> | ||
<scope>meta.template.twig - meta.embedded</scope> | ||
<description>Twig apply</description> | ||
<description>Twig apply block</description> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<snippet> | ||
<content><![CDATA[ | ||
{% guard ${1:type} ${2:callable} %} | ||
${TM_TEMPLATE_INDENT}$0 | ||
{% endguard %} | ||
]]></content> | ||
<tabTrigger>bguard</tabTrigger> | ||
<scope>meta.template.twig - meta.guardded</scope> | ||
<description>Twig guard block</description> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
Snippets/sandbox.sublime-snippet → Snippets/blocks/sandbox.sublime-snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
<snippet> | ||
<content><![CDATA[ | ||
{% sandbox $1 %} | ||
{% sandbox %} | ||
${TM_TEMPLATE_INDENT}$0 | ||
{% endsandbox %} | ||
]]></content> | ||
<tabTrigger>sandbox</tabTrigger> | ||
<tabTrigger>bsandbox</tabTrigger> | ||
<scope>meta.template.twig - meta.embedded</scope> | ||
<description>Twig sandbox</description> | ||
<description>Twig sandbox block</description> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<snippet> | ||
<content><![CDATA[{% apply ${1:filter} %}]]></content> | ||
<tabTrigger>apply</tabTrigger> | ||
<scope>meta.template.twig - meta.template.twig meta.embedded</scope> | ||
<description>Twig apply tag</description> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<snippet> | ||
<content><![CDATA[{% autoescape $1 %}]]></content> | ||
<tabTrigger>autoescape</tabTrigger> | ||
<scope>meta.template.twig - meta.template.twig meta.embedded</scope> | ||
<description>Twig autoescape tag</description> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<snippet> | ||
<content><![CDATA[{% block ${1:block_name} %}]]></content> | ||
<tabTrigger>block</tabTrigger> | ||
<scope>meta.template.twig - meta.template.twig meta.embedded</scope> | ||
<description>Twig block tag</description> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<snippet> | ||
<content><![CDATA[{% cache $1 %}]]></content> | ||
<tabTrigger>cache</tabTrigger> | ||
<scope>meta.template.twig - meta.template.twig meta.embedded</scope> | ||
<description>Twig cache tag</description> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<snippet> | ||
<content><![CDATA[{% deprecated $1 %}]]></content> | ||
<tabTrigger>deprecated</tabTrigger> | ||
<scope>meta.template.twig - meta.template.twig meta.embedded</scope> | ||
<description>Twig deprecated tag</description> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<snippet> | ||
<content><![CDATA[{% else %}]]></content> | ||
<tabTrigger>else</tabTrigger> | ||
<scope>meta.template.twig - meta.template.twig meta.embedded</scope> | ||
<description>Twig else tag</description> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<snippet> | ||
<content><![CDATA[{% elseif ${1:condition} %}]]></content> | ||
<tabTrigger>elseif</tabTrigger> | ||
<scope>meta.template.twig - meta.template.twig meta.embedded</scope> | ||
<description>Twig elseif tag</description> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<snippet> | ||
<content><![CDATA[{% embed ${1:template_name} %}]]></content> | ||
<tabTrigger>embed</tabTrigger> | ||
<scope>meta.template.twig - meta.template.twig meta.embedded</scope> | ||
<description>Twig embed tag</description> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<snippet> | ||
<content><![CDATA[{% endapply %}]]></content> | ||
<tabTrigger>endapply</tabTrigger> | ||
<scope>meta.template.twig - meta.template.twig meta.embedded</scope> | ||
<description>Twig endapply tag</description> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<snippet> | ||
<content><![CDATA[{% endautoescape %}]]></content> | ||
<tabTrigger>endautoescape</tabTrigger> | ||
<scope>meta.template.twig - meta.template.twig meta.embedded</scope> | ||
<description>Twig endautoescape tag</description> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<snippet> | ||
<content><![CDATA[{% endblock %}]]></content> | ||
<tabTrigger>endblock</tabTrigger> | ||
<scope>meta.template.twig - meta.template.twig meta.embedded</scope> | ||
<description>Twig endblock tag</description> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<snippet> | ||
<content><![CDATA[{% endcache %}]]></content> | ||
<tabTrigger>endcache</tabTrigger> | ||
<scope>meta.template.twig - meta.template.twig meta.embedded</scope> | ||
<description>Twig endcache tag</description> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<snippet> | ||
<content><![CDATA[{% endfor %}]]></content> | ||
<tabTrigger>endfor</tabTrigger> | ||
<scope>meta.template.twig - meta.template.twig meta.embedded</scope> | ||
<description>Twig endfor tag</description> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<snippet> | ||
<content><![CDATA[{% endguard %}]]></content> | ||
<tabTrigger>endguard</tabTrigger> | ||
<scope>meta.template.twig - meta.template.twig meta.embedded</scope> | ||
<description>Twig endguard tag</description> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<snippet> | ||
<content><![CDATA[{% endif %}]]></content> | ||
<tabTrigger>endif</tabTrigger> | ||
<scope>meta.template.twig - meta.embedded</scope> | ||
<description>Twig endif tag</description> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<snippet> | ||
<content><![CDATA[{% endmacro %}]]></content> | ||
<tabTrigger>endmacro</tabTrigger> | ||
<scope>meta.template.twig - meta.template.twig meta.embedded</scope> | ||
<description>Twig endmacro tag</description> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<snippet> | ||
<content><![CDATA[{% endsandbox %}]]></content> | ||
<tabTrigger>endsandbox</tabTrigger> | ||
<scope>meta.template.twig - meta.template.twig meta.embedded</scope> | ||
<description>Twig endsandbox tag</description> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<snippet> | ||
<content><![CDATA[{% endverbatim %}]]></content> | ||
<tabTrigger>endverbatim</tabTrigger> | ||
<scope>meta.template.twig - meta.template.twig meta.embedded</scope> | ||
<description>Twig endverbatim tag</description> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<snippet> | ||
<content><![CDATA[{% endwith %}]]></content> | ||
<tabTrigger>endwith</tabTrigger> | ||
<scope>meta.template.twig - meta.template.twig meta.embedded</scope> | ||
<description>Twig endwith tag</description> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<snippet> | ||
<content><![CDATA[{% extends "${0:template}" %}]]></content> | ||
<tabTrigger>extends</tabTrigger> | ||
<scope>meta.template.twig - meta.template.twig meta.embedded</scope> | ||
<description>Twig extends tag</description> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<snippet> | ||
<content><![CDATA[{% flush %}]]></content> | ||
<tabTrigger>flush</tabTrigger> | ||
<scope>meta.template.twig - meta.template.twig meta.embedded</scope> | ||
<description>Twig flush tag</description> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<snippet> | ||
<content><![CDATA[{% for ${1:item} in ${2:sequence} %}]]></content> | ||
<tabTrigger>for</tabTrigger> | ||
<scope>meta.template.twig - meta.template.twig meta.embedded</scope> | ||
<description>Twig for tag</description> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<snippet> | ||
<content><![CDATA[{% from ${1:template} import $0 %}]]></content> | ||
<tabTrigger>from</tabTrigger> | ||
<scope>meta.template.twig - meta.template.twig meta.embedded</scope> | ||
<description>Twig from...import...</description> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<snippet> | ||
<content><![CDATA[{% guard filter ${1:callable} %}]]></content> | ||
<tabTrigger>guardfilter</tabTrigger> | ||
<scope>meta.template.twig - meta.template.twig meta.embedded</scope> | ||
<description>Twig guard tag</description> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<snippet> | ||
<content><![CDATA[{% guard function ${1:callable} %}]]></content> | ||
<tabTrigger>guardfunction</tabTrigger> | ||
<scope>meta.template.twig - meta.template.twig meta.embedded</scope> | ||
<description>Twig guard tag</description> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<snippet> | ||
<content><![CDATA[{% guard test ${1:callable} %}]]></content> | ||
<tabTrigger>guardtest</tabTrigger> | ||
<scope>meta.template.twig - meta.template.twig meta.embedded</scope> | ||
<description>Twig guard tag</description> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<snippet> | ||
<content><![CDATA[{% guard ${1:type} ${2:callable} %}]]></content> | ||
<tabTrigger>guard</tabTrigger> | ||
<scope>meta.template.twig - meta.template.twig meta.embedded</scope> | ||
<description>Twig guard tag</description> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<snippet> | ||
<content><![CDATA[{% if ${1:condition} %}]]></content> | ||
<tabTrigger>if</tabTrigger> | ||
<scope>meta.template.twig - meta.template.twig meta.embedded</scope> | ||
<description>Twig if tag</description> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<snippet> | ||
<content><![CDATA[{% import ${0:template} %}]]></content> | ||
<tabTrigger>import</tabTrigger> | ||
<scope>meta.template.twig - meta.template.twig meta.embedded</scope> | ||
<description>Twig import tag</description> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<snippet> | ||
<content><![CDATA[{% macro ${1:function_name}() %}]]></content> | ||
<tabTrigger>macro</tabTrigger> | ||
<scope>meta.template.twig - meta.template.twig meta.embedded</scope> | ||
<description>Twig macro tag</description> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<snippet> | ||
<content><![CDATA[{% sandbox %}]]></content> | ||
<tabTrigger>sandbox</tabTrigger> | ||
<scope>meta.template.twig - meta.template.twig meta.embedded</scope> | ||
<description>Twig sandbox tag</description> | ||
</snippet> |
4 changes: 1 addition & 3 deletions
4
Snippets/set.sublime-snippet → Snippets/tags/set.sublime-snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<snippet> | ||
<content><![CDATA[{% with $1 %}]]></content> | ||
<tabTrigger>with</tabTrigger> | ||
<scope>meta.template.twig - meta.template.twig meta.embedded</scope> | ||
<description>Twig with tag</description> | ||
</snippet> |