vimrc/sources_non_forked/vim-snippets/snippets/twig.snippets

35 lines
856 B
Text
Raw Normal View History

2016-06-11 13:56:50 +00:00
snippet bl "{% block xyz %} .. {% endblock xyz %}"
2016-05-14 11:57:54 +00:00
{% block ${1} %}
2017-02-11 13:01:38 +00:00
${2:${VISUAL}}
2016-05-14 11:57:54 +00:00
{% endblock $1 %}
2016-06-11 13:56:50 +00:00
snippet js "{% javascripts 'xyz' %} .. {% endjavascripts %}"
2016-05-14 11:57:54 +00:00
{% javascripts '${1}' %}
<script src="{{ asset_url }}"></script>
{% endjavascripts %}
2016-06-11 13:56:50 +00:00
snippet css "{% stylesheets 'xyz' %} .. {% endstylesheets %}"
2016-05-14 11:57:54 +00:00
{% stylesheets '${1}' %}
<link rel="stylesheet" href="{{ asset_url }}">
{% endstylesheets %}
2016-06-11 13:56:50 +00:00
snippet if "{% if %} .. {% endif %}"
2016-05-14 11:57:54 +00:00
{% if ${1} %}
2017-02-11 13:01:38 +00:00
${2:${VISUAL}}
2016-05-14 11:57:54 +00:00
{% endif %}
2016-06-11 13:56:50 +00:00
snippet ife "{% if %} .. {% else %} .. {% endif %}"
2016-05-14 11:57:54 +00:00
{% if ${1} %}
2017-02-11 13:01:38 +00:00
${2:${VISUAL}}
2016-05-14 11:57:54 +00:00
{% else %}
${0}
{% endif %}
2016-06-11 13:56:50 +00:00
snippet el "{% else %}"
2016-05-14 11:57:54 +00:00
{% else %}
2017-02-11 13:01:38 +00:00
${0:${VISUAL}}
2016-06-11 13:56:50 +00:00
snippet eif "{% elseif %}"
2016-05-14 11:57:54 +00:00
{% elseif ${1} %}
${0}
2016-06-11 13:56:50 +00:00
snippet for "{% for x in y %} .. {% endfor %}"
2016-05-14 11:57:54 +00:00
{% for ${1} in ${2} %}
${3}
{% endfor %}
2016-06-11 13:56:50 +00:00
snippet ext "{% extends xyz %}"
2016-05-14 11:57:54 +00:00
{% extends ${1} %}