1
0
Fork 0
mirror of synced 2024-12-27 00:53:20 -05:00
ultimate-vim/sources_non_forked/vim-snippets/UltiSnips/htmldjango.snippets

300 lines
3.9 KiB
Text
Raw Normal View History

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