1
0
Fork 0
mirror of synced 2024-11-30 04:35:35 -05:00
ultimate-vim/sources_non_forked/vim-snippets/snippets/htmldjango.snippets

142 lines
2.4 KiB
Text
Raw Normal View History

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