vim/snippets/htmldjango.snippets @ 3173592cfa27

More
author Steve Losh <steve@stevelosh.com>
date Tue, 21 May 2019 10:19:44 -0400
parents 9aba93d73e06
children (none)
# Generic Tags
snippet %
	{% ${1} %}${2}
snippet %%
	{% ${1:tag_name} %}
	${2}
	{% end$1 %}
snippet {
	{{ ${1} }}${2}
snippet gau
	get_absolute_url${1}
snippet gfn
	get_full_name${1}
# 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 %}
snippet if
	{% if ${1} %}
	${2}
	{% endif %}
snippet else
	{% else %}
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} %}
# 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}