1
0
Fork 0
mirror of synced 2024-12-24 07:43:20 -05:00
ultimate-vim/sources_non_forked/vim-snippets/UltiSnips/twig.snippets

54 lines
799 B
Text
Raw Normal View History

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} %}
2016-05-14 07:57:54 -04:00
${0:${VISUAL}}
{% endif %}
endsnippet
snippet ife "twig if ... else" b
{% if ${1} %}
${2}
2016-05-14 07:57:54 -04:00
{% else %}
${0}
{% endif %}
endsnippet
2016-05-14 07:57:54 -04:00
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