Removed redundant UltiSnips for Twig

This commit is contained in:
Mathew Attlee 2016-05-27 14:18:12 +01:00
parent 74a5b6962d
commit c2cb84db11
2 changed files with 9 additions and 71 deletions

View File

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

View File

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