1
0
Fork 0
mirror of synced 2024-11-27 11:15:35 -05:00
ultimate-vim/sources_non_forked/vim-snippets/snippets/jinja.snippets
2016-01-05 15:18:45 -03:00

142 lines
2.4 KiB
Text

# Generic tags
extends html
snippet %
{% ${1} %}
snippet %%
{% ${1:tag_name} %}
${0}
{% end$1 %}
snippet {
{{ ${1} }}
# Template Tags
snippet autoescape
{% autoescape ${1:off} %}
${0}
{% endautoescape %}
snippet block
{% block ${1} %}
${0}
{% endblock %}
snippet #
{# ${0:comment} #}
snippet comment
{% comment %}
${0}
{% endcomment %}
snippet cycle
{% cycle ${1:val1} ${2:val2} ${3:as ${4}} %}
snippet debug
{% debug %}
snippet extends
{% extends "${0:base.html}" %}
snippet filter
{% filter ${1} %}
${0}
{% endfilter %}
snippet firstof
{% firstof ${1} %}
snippet for
{% for ${1} in ${2} %}
${0}
{% endfor %}
snippet empty
{% empty %}
${0}
snippet if
{% if ${1} %}
${0}
{% endif %}
snippet el
{% else %}
${1}
snippet eif
{% elif ${1} %}
${0}
snippet ifchanged
{% ifchanged %}${1}{% endifchanged %}
snippet ifequal
{% ifequal ${1} ${2} %}
${0}
{% endifequal %}
snippet ifnotequal
{% ifnotequal ${1} ${2} %}
${0}
{% endifnotequal %}
snippet include
{% include "${0}" %}
snippet load
{% load ${0} %}
snippet now
{% now "${0:jS F Y H:i}" %}
snippet regroup
{% regroup ${1} by ${2} as ${0} %}
snippet spaceless
{% spaceless %}${0}{% endspaceless %}
snippet ssi
{% ssi ${0} %}
snippet trans
{% trans "${0:string}" %}
snippet url
{% url ${1} as ${0} %}
snippet widthratio
{% widthratio ${1:this_value} ${2:max_value} ${0:100} %}
snippet with
{% with ${1} as ${2} %}
${0}
{% endwith %}
# Template Filters
# Note: Since SnipMate can't determine which template filter you are
# expanding without the "|" character, these do not add the "|"
# character. These save a few keystrokes still.
# Note: Template tags that take no arguments are not implemented.
snippet add
add:"${0}"
snippet center
center:"${0}"
snippet cut
cut:"${0}"
snippet date
date:"${0}"
snippet default
default:"${0}"
snippet defaultifnone
default_if_none:"${0}"
snippet dictsort
dictsort:"${0}"
snippet dictsortrev
dictsortreversed:"${0}"
snippet divisibleby
divisibleby:"${0}"
snippet floatformat
floatformat:"${0}"
snippet getdigit
get_digit:"${0}"
snippet join
join:"${0}"
snippet lengthis
length_is:"${0}"
snippet pluralize
pluralize:"${0}"
snippet removetags
removetags:"${0}"
snippet slice
slice:"${0}"
snippet stringformat
stringformat:"${0}"
snippet time
time:"${0}"
snippet truncatewords
truncatewords:${0}
snippet truncatewordshtml
truncatewords_html:${0}
snippet urlizetrunc
urlizetrunc:${0}
snippet wordwrap
wordwrap:${0}