aboutsummaryrefslogtreecommitdiff
path: root/vim/bundle/vim-snippets/snippets/jinja.snippets
blob: 7d14ca8334e6800820cf2161fb450d152215cb10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# Generic tags

extends html

snippet %
	{% ${1} %}
snippet %%
	{% ${1:tag_name} %}
	${0}
	{% end$1 %}
snippet {
	{{ ${1} }}
# Template Tags

snippet autoescape
	{% autoescape ${1:off} %}
		${0}
	{% endautoescape %}
snippet block
	{% block ${1} %}
		${0}
	{% endblock %}
snippet #
	{# ${0:comment} #}
snippet comment
	{% comment %}
		${0}
	{% endcomment %}
snippet cycle
	{% cycle ${1:val1} ${2:val2} ${3:as ${4}} %}
snippet debug
	{% debug %}
snippet extends
	{% extends "${0:base.html}" %}
snippet filter
	{% filter ${1} %}
		${0}
	{% endfilter %}
snippet firstof
	{% firstof ${1} %}
snippet for
	{% for ${1} in ${2} %}
		${0}
	{% endfor %}
snippet empty
	{% empty %}
	${0}
snippet if
	{% if ${1} %}
		${0}
	{% endif %}
snippet el
	{% else %}
		${1}
snippet eif
	{% elif ${1} %}
		${0}
snippet ifchanged
	{% ifchanged %}${1}{% endifchanged %}
snippet ifequal
	{% ifequal ${1} ${2} %}
		${0}
	{% endifequal %}
snippet ifnotequal
	{% ifnotequal ${1} ${2} %}
		${0}
	{% endifnotequal %}
snippet include
	{% include "${0}" %}
snippet load
	{% load ${0} %}
snippet now
	{% now "${0:jS F Y H:i}" %}
snippet regroup
	{% regroup ${1} by ${2} as ${0} %}
snippet spaceless
	{% spaceless %}${0}{% endspaceless %}
snippet ssi
	{% ssi ${0} %}
snippet trans
	{% trans "${0:string}" %}
snippet url
	{% url ${1} as ${0} %}
snippet widthratio
	{% widthratio ${1:this_value} ${2:max_value} ${0:100} %}
snippet with
	{% with ${1} as ${2} %}
		${0}
	{% endwith %}

# 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}"
snippet center
	center:"${0}"
snippet cut
	cut:"${0}"
snippet date
	date:"${0}"
snippet default
	default:"${0}"
snippet defaultifnone
	default_if_none:"${0}"
snippet dictsort
	dictsort:"${0}"
snippet dictsortrev
	dictsortreversed:"${0}"
snippet divisibleby
	divisibleby:"${0}"
snippet floatformat
	floatformat:"${0}"
snippet getdigit
	get_digit:"${0}"
snippet join
	join:"${0}"
snippet lengthis
	length_is:"${0}"
snippet pluralize
	pluralize:"${0}"
snippet removetags
	removetags:"${0}"
snippet slice
	slice:"${0}"
snippet stringformat
	stringformat:"${0}"
snippet time
	time:"${0}"
snippet truncatewords
	truncatewords:${0}
snippet truncatewordshtml
	truncatewords_html:${0}
snippet urlizetrunc
	urlizetrunc:${0}
snippet wordwrap
	wordwrap:${0}