Correctly indented snipMate template for Twig

This commit is contained in:
Mathew Attlee 2016-05-06 12:29:42 +01:00
parent c3f1a708be
commit b2dda36fc7

View File

@ -1,43 +1,43 @@
# twig block
snippet bl
{% block ${1} %}
${2}
{% endblock $1 %}
{% block ${1} %}
${2}
{% endblock $1 %}
# twig javascripts
snippet js
{% javascripts '${1}' %}
{% javascripts '${1}' %}
<script src="{{ asset_url }}"></script>
{% endjavascripts %}
{% endjavascripts %}
# twig stylesheets
snippet css
{% stylesheets '${1}' %}
{% stylesheets '${1}' %}
<link rel="stylesheet" href="{{ asset_url }}">
{% endstylesheets %}
{% endstylesheets %}
# twig if
snippet if
{% if ${1} %}
${2}
{% endif %}
{% if ${1} %}
${2}
{% endif %}
# twig if ... else
snippet ife
{% if ${1} %}
${2}
{% else %}
${0}
{% endif %}
{% if ${1} %}
${2}
{% else %}
${0}
{% endif %}
# twig else
snippet el
{% else %}
${0}
{% else %}
${0}
# twig elseif
snippet eif
{% elseif ${1} %}
${0}
{% elseif ${1} %}
${0}
# twig for
snippet for
{% for ${1} in ${2} %}
${3}
{% endfor %}
{% for ${1} in ${2} %}
${3}
{% endfor %}
# twig extends
snippet ext
{% extends ${1} %}
{% extends ${1} %}