Skip to content

Commit b56e303

Browse files
authored
Merge pull request #159 from sh78/twig-additions
Twig additions & bugfixes
2 parents e191622 + 62139c9 commit b56e303

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

neosnippets/twig.snip

+15-3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ options head
1313
${0:TARGET}
1414
{% endblock %}
1515

16+
snippet dump
17+
abbr <pre> {{ dump(...) }} </pre>
18+
options head
19+
<pre>
20+
{{ dump(${0:TARGET}) }}
21+
</pre>
22+
1623
snippet embed
1724
abbr {% embed ... %} ... {% endembed %}
1825
options head
@@ -50,7 +57,7 @@ options head
5057
snippet from
5158
abbr {% from '...' import ... %}
5259
options head
53-
{% from '${1:#:module}' import ${2:#:macro}}
60+
{% from '${1:#:module}' import ${2:#:macro} %}
5461

5562
snippet if
5663
abbr {% if ... %} ... {% endif %}
@@ -75,12 +82,17 @@ options head
7582
snippet import
7683
abbr {% import '...' as ... %}
7784
options head
78-
{% import '${1:#:module}' as ${2:#:namespace}}
85+
{% import '${1:#:module}' as ${2:#:namespace} %}
7986

8087
snippet include
8188
abbr {% include '...' %}
8289
options head
83-
{% include '${1:#:template}'}
90+
{% include '${1:#:template}' %}
91+
92+
snippet includewith
93+
abbr {% include '...' %}
94+
options head
95+
{% include '${1:#:template}' with {${2:#:'key'}: ${2:#:'value'}} %}
8496

8597
snippet macro
8698
abbr {% macro ...(...) %} ... {% endmacro %}

0 commit comments

Comments
 (0)