diff --git a/UltiSnips/twig.snippets b/UltiSnips/twig.snippets deleted file mode 100644 index c470d9b..0000000 --- a/UltiSnips/twig.snippets +++ /dev/null @@ -1,53 +0,0 @@ -priority -50 - -snippet bl "twig block" b -{% block ${1} %} -${2} -{% endblock $1 %} -endsnippet - -snippet js "twig javascripts" b -{% javascripts '${1}' %} - -{% endjavascripts %} -endsnippet - -snippet css "twig stylesheets" b -{% stylesheets '${1}' %} - -{% 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 diff --git a/snippets/twig.snippets b/snippets/twig.snippets index 50ae823..47997c3 100644 --- a/snippets/twig.snippets +++ b/snippets/twig.snippets @@ -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}' %} {% endjavascripts %} -# twig stylesheets -snippet css +snippet css "{% stylesheets 'xyz' %} .. {% endstylesheets %}" {% stylesheets '${1}' %} {% 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} %}