1
0
Fork 0
mirror of synced 2024-11-27 03:05:36 -05:00
ultimate-vim/sources_non_forked/vim-snippets/snippets/htmldjango.snippets

143 lines
2.4 KiB
Text
Raw Normal View History

2012-08-16 23:41:25 -04:00
# Generic tags
2015-12-08 08:20:04 -05:00
extends html
2012-08-16 23:41:25 -04:00
snippet %
{% ${1} %}
2012-08-16 23:41:25 -04:00
snippet %%
{% ${1:tag_name} %}
${0}
2012-08-16 23:41:25 -04:00
{% end$1 %}
snippet {
{{ ${1} }}
2012-08-16 23:41:25 -04:00
# Template Tags
snippet autoescape
{% autoescape ${1:off} %}
${0}
2012-08-16 23:41:25 -04:00
{% endautoescape %}
snippet block
{% block ${1} %}
${0}
2012-08-16 23:41:25 -04:00
{% endblock %}
snippet #
{# ${0:comment} #}
2012-08-16 23:41:25 -04:00
snippet comment
{% comment %}
${0}
2012-08-16 23:41:25 -04:00
{% endcomment %}
snippet cycle
{% cycle ${1:val1} ${2:val2} ${3:as ${4}} %}
snippet debug
{% debug %}
snippet extends
{% extends "${0:base.html}" %}
2012-08-16 23:41:25 -04:00
snippet filter
{% filter ${1} %}
${0}
2012-08-16 23:41:25 -04:00
{% endfilter %}
snippet firstof
{% firstof ${1} %}
snippet for
{% for ${1} in ${2} %}
${0}
2012-08-16 23:41:25 -04:00
{% endfor %}
snippet empty
{% empty %}
${0}
2012-08-16 23:41:25 -04:00
snippet if
{% if ${1} %}
${0}
2012-08-16 23:41:25 -04:00
{% endif %}
2013-07-17 19:06:05 -04:00
snippet el
2012-08-16 23:41:25 -04:00
{% else %}
${1}
2013-07-17 19:06:05 -04:00
snippet eif
{% elif ${1} %}
${0}
2012-08-16 23:41:25 -04:00
snippet ifchanged
{% ifchanged %}${1}{% endifchanged %}
snippet ifequal
{% ifequal ${1} ${2} %}
${0}
2012-08-16 23:41:25 -04:00
{% endifequal %}
snippet ifnotequal
{% ifnotequal ${1} ${2} %}
${0}
2012-08-16 23:41:25 -04:00
{% endifnotequal %}
snippet include
{% include "${0}" %}
2012-08-16 23:41:25 -04:00
snippet load
{% load ${0} %}
2012-08-16 23:41:25 -04:00
snippet now
{% now "${0:jS F Y H:i}" %}
2012-08-16 23:41:25 -04:00
snippet regroup
{% regroup ${1} by ${2} as ${0} %}
2012-08-16 23:41:25 -04:00
snippet spaceless
{% spaceless %}${0}{% endspaceless %}
2012-08-16 23:41:25 -04:00
snippet ssi
{% ssi ${0} %}
2012-08-16 23:41:25 -04:00
snippet trans
{% trans "${0:string}" %}
2012-08-16 23:41:25 -04:00
snippet url
{% url ${1} as ${0} %}
2012-08-16 23:41:25 -04:00
snippet widthratio
{% widthratio ${1:this_value} ${2:max_value} ${0:100} %}
2012-08-16 23:41:25 -04:00
snippet with
{% with ${1} as ${2} %}
${0}
{% endwith %}
2012-08-16 23:41:25 -04:00
# 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}"
2012-08-16 23:41:25 -04:00
snippet center
center:"${0}"
2012-08-16 23:41:25 -04:00
snippet cut
cut:"${0}"
2012-08-16 23:41:25 -04:00
snippet date
date:"${0}"
2012-08-16 23:41:25 -04:00
snippet default
default:"${0}"
2012-08-16 23:41:25 -04:00
snippet defaultifnone
default_if_none:"${0}"
2012-08-16 23:41:25 -04:00
snippet dictsort
dictsort:"${0}"
2012-08-16 23:41:25 -04:00
snippet dictsortrev
dictsortreversed:"${0}"
2012-08-16 23:41:25 -04:00
snippet divisibleby
divisibleby:"${0}"
2012-08-16 23:41:25 -04:00
snippet floatformat
floatformat:"${0}"
2012-08-16 23:41:25 -04:00
snippet getdigit
get_digit:"${0}"
2012-08-16 23:41:25 -04:00
snippet join
join:"${0}"
2012-08-16 23:41:25 -04:00
snippet lengthis
length_is:"${0}"
2012-08-16 23:41:25 -04:00
snippet pluralize
pluralize:"${0}"
2012-08-16 23:41:25 -04:00
snippet removetags
removetags:"${0}"
2012-08-16 23:41:25 -04:00
snippet slice
slice:"${0}"
2012-08-16 23:41:25 -04:00
snippet stringformat
stringformat:"${0}"
2012-08-16 23:41:25 -04:00
snippet time
time:"${0}"
2012-08-16 23:41:25 -04:00
snippet truncatewords
truncatewords:${0}
2012-08-16 23:41:25 -04:00
snippet truncatewordshtml
truncatewords_html:${0}
2012-08-16 23:41:25 -04:00
snippet urlizetrunc
urlizetrunc:${0}
2012-08-16 23:41:25 -04:00
snippet wordwrap
wordwrap:${0}