1
0
Fork 0
mirror of synced 2024-12-22 06:51:06 -05:00
ultimate-vim/sources_non_forked/vim-snippets/UltiSnips/htmldjango.snippets
2016-06-26 13:12:36 +02:00

299 lines
4 KiB
Text

priority -50
extends html
# Generic Tags
snippet % "" bi
{% ${1} %}${2}
endsnippet
snippet %% "" bi
{% ${1:tag_name} %}
${2}
{% end$1 %}
endsnippet
snippet { "" bi
{{ ${1} }}${2}
endsnippet
# Template Tags
snippet autoescape "" bi
{% autoescape ${1:off} %}
${2}
{% endautoescape %}
endsnippet
snippet block "" bi
{% block ${1} %}
${2}
{% endblock $1 %}
endsnippet
snippet # "" bi
{# ${1:comment} #}
endsnippet
snippet comment "" bi
{% comment %}
${1}
{% endcomment %}
endsnippet
snippet cycle "" bi
{% cycle ${1:val1} ${2:val2} ${3:as ${4}} %}
endsnippet
snippet debug "" bi
{% debug %}
endsnippet
snippet extends "" bi
{% extends "${1:base.html}" %}
endsnippet
snippet filter "" bi
{% filter ${1} %}
${2}
{% endfilter %}
endsnippet
snippet firstof "" bi
{% firstof ${1} %}
endsnippet
snippet for "" bi
{% for ${1} in ${2} %}
${3}
{% endfor %}
endsnippet
snippet empty "" bi
{% empty %}
${1}
endsnippet
snippet if "" bi
{% if ${1} %}
${2}
{% endif %}
endsnippet
snippet iif "" bi
{% if ${1} %}${2}{% endif %}
endsnippet
snippet ielse "" bi
{% else %}${1}
endsnippet
snippet else "" bi
{% else %}
${1}
endsnippet
snippet ielif "" bi
{% elif %}${1}
endsnippet
snippet elif "" bi
{% elif %}
${1}
endsnippet
snippet ifchanged "" bi
{% ifchanged %}${1}{% endifchanged %}
endsnippet
snippet ifequal "" bi
{% ifequal ${1} ${2} %}
${3}
{% endifequal %}
endsnippet
snippet ifnotequal "" bi
{% ifnotequal ${1} ${2} %}
${3}
{% endifnotequal %}
endsnippet
snippet include "" bi
{% include "${1}" %}
endsnippet
snippet load "" bi
{% load ${1} %}
endsnippet
snippet now "" bi
{% now "${1:jS F Y H:i}" %}
endsnippet
snippet regroup "" bi
{% regroup ${1} by ${2} as ${3} %}
endsnippet
snippet spaceless "" bi
{% spaceless %}${1}{% endspaceless %}
endsnippet
snippet ssi "" bi
{% ssi ${1} %}
endsnippet
snippet trans "" bi
{% trans "${1:string}" %}
endsnippet
snippet url "" bi
{% url ${1} as ${2} %}
endsnippet
snippet widthratio "" bi
{% widthratio ${1:this_value} ${2:max_value} ${3:100} %}
endsnippet
snippet with "" bi
{% with ${1} as ${2} %}
${VISUAL}
{% endwith %}
endsnippet
snippet verbatim "" bi
{% verbatim %}
${VISUAL}
{% endverbatim %}
endsnippet
snippet super "" bi
{{ block.super }}
endsnippet
snippet staticu "" bi
{{ STATIC_URL }}
endsnippet
snippet static "" bi
{% static "${VISUAL}" %}
endsnippet
snippet mediau "" bi
{{ MEDIA_URL }}
endsnippet
snippet iblock "" bi
{% block ${1:blockname} %}${VISUAL}{% endblock $1 %}
endsnippet
snippet csrf "" bi
{% csrf_token %}
endsnippet
snippet blocktrans "" bi
{% blocktrans %}
${VISUAL}
{% endblocktrans %}
endsnippet
snippet lorem "" bi
{% lorem ${1} %}
endsnippet
# 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 "" bi
add:"${1}"
endsnippet
snippet center "" bi
center:"${1}"
endsnippet
snippet cut "" bi
cut:"${1}"
endsnippet
snippet date "" bi
date:"${1}"
endsnippet
snippet default "" bi
default:"${1}"
endsnippet
snippet defaultifnone "" bi
default_if_none:"${1}"
endsnippet
snippet dictsort "" bi
dictsort:"${1}"
endsnippet
snippet dictsortrev "" bi
dictsortreversed:"${1}"
endsnippet
snippet divisibleby "" bi
divisibleby:"${1}"
endsnippet
snippet floatformat "" bi
floatformat:"${1}"
endsnippet
snippet getdigit "" bi
get_digit:"${1}"
endsnippet
snippet join "" bi
join:"${1}"
endsnippet
snippet lengthis "" bi
length_is:"${1}"
endsnippet
snippet pluralize "" bi
pluralize:"${1}"
endsnippet
snippet removetags "" bi
removetags:"${1}"
endsnippet
snippet slice "" bi
slice:"${1}"
endsnippet
snippet stringformat "" bi
stringformat:"${1}"
endsnippet
snippet time "" bi
time:"${1}"
endsnippet
snippet truncatewords "" bi
truncatewords:${1}
endsnippet
snippet truncatewordshtml "" bi
truncatewords_html:${1}
endsnippet
snippet urlizetrunc "" bi
urlizetrunc:${1}
endsnippet
snippet wordwrap "" bi
wordwrap:${1}
endsnippet
# vim:ft=snippets: