aboutsummaryrefslogtreecommitdiff
path: root/vim/bundle/vim-snippets/UltiSnips/htmldjango.snippets
blob: 37fa85fd0ae86eff1f583355a43e2b2ef918a274 (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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
priority -50

extends html

# Generic Tags
snippet % "" bi
{% ${1} %}${2}
endsnippet

snippet %% "" bi
{% ${1:tag_name} %}
	${2}
{% end$1 %}
endsnippet

snippet { "" bi
{{ ${1} }}${2}
endsnippet

# Template Tags

snippet autoescape "" bi
{% autoescape ${1:off} %}
	${2}
{% endautoescape %}
endsnippet

snippet block "" bi
{% block ${1} %}
	${2}
{% endblock $1 %}
endsnippet

snippet # "" bi
{# ${1:comment} #}
endsnippet

snippet comment "" bi
{% comment %}
	${1}
{% endcomment %}
endsnippet

snippet cycle "" bi
{% cycle ${1:val1} ${2:val2} ${3:as ${4}} %}
endsnippet

snippet debug "" bi
{% debug %}
endsnippet

snippet extends "" bi
{% extends "${1:base.html}" %}
endsnippet

snippet filter "" bi
{% filter ${1} %}
	${2}
{% endfilter %}
endsnippet

snippet firstof "" bi
{% firstof ${1} %}
endsnippet

snippet for "" bi
{% for ${1} in ${2} %}
	${3}
{% endfor %}
endsnippet

snippet empty "" bi
{% empty %}
	${1}
endsnippet

snippet if "" bi
{% if ${1} %}
	${2}
{% endif %}
endsnippet

snippet iif "" bi
{% if ${1} %}${2}{% endif %}
endsnippet

snippet ielse "" bi
{% else %}${1}
endsnippet

snippet else "" bi
{% else %}
	${1}
endsnippet

snippet ielif "" bi
{% elif %}${1}
endsnippet

snippet elif "" bi
{% elif %}
	${1}
endsnippet

snippet ifchanged "" bi
{% ifchanged %}${1}{% endifchanged %}
endsnippet

snippet ifequal "" bi
{% ifequal ${1} ${2} %}
	${3}
{% endifequal %}
endsnippet

snippet ifnotequal "" bi
{% ifnotequal ${1} ${2} %}
	${3}
{% endifnotequal %}
endsnippet

snippet include "" bi
{% include "${1}" %}
endsnippet

snippet load "" bi
{% load ${1} %}
endsnippet

snippet now "" bi
{% now "${1:jS F Y H:i}" %}
endsnippet

snippet regroup "" bi
{% regroup ${1} by ${2} as ${3} %}
endsnippet

snippet spaceless "" bi
{% spaceless %}${1}{% endspaceless %}
endsnippet

snippet ssi "" bi
{% ssi ${1} %}
endsnippet

snippet trans "" bi
{% trans "${1:string}" %}
endsnippet

snippet url "" bi
{% url ${1} as ${2} %}
endsnippet

snippet widthratio "" bi
{% widthratio ${1:this_value} ${2:max_value} ${3:100} %}
endsnippet

snippet with "" bi
{% with ${1} as ${2} %}
	${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

snippet csrf "" bi
{% csrf_token %}
endsnippet

snippet blocktrans "" bi
{% blocktrans %}
    ${VISUAL}
{% endblocktrans %}
endsnippet

snippet lorem "" bi
{% lorem ${1} %}
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
add:"${1}"
endsnippet

snippet center "" bi
center:"${1}"
endsnippet

snippet cut "" bi
cut:"${1}"
endsnippet

snippet date "" bi
date:"${1}"
endsnippet

snippet default "" bi
default:"${1}"
endsnippet

snippet defaultifnone "" bi
default_if_none:"${1}"
endsnippet

snippet dictsort "" bi
dictsort:"${1}"
endsnippet

snippet dictsortrev "" bi
dictsortreversed:"${1}"
endsnippet

snippet divisibleby "" bi
divisibleby:"${1}"
endsnippet

snippet floatformat "" bi
floatformat:"${1}"
endsnippet

snippet getdigit "" bi
get_digit:"${1}"
endsnippet

snippet join "" bi
join:"${1}"
endsnippet

snippet lengthis "" bi
length_is:"${1}"
endsnippet

snippet pluralize "" bi
pluralize:"${1}"
endsnippet

snippet removetags "" bi
removetags:"${1}"
endsnippet

snippet slice "" bi
slice:"${1}"
endsnippet

snippet stringformat "" bi
stringformat:"${1}"
endsnippet

snippet time "" bi
time:"${1}"
endsnippet

snippet truncatewords "" bi
truncatewords:${1}
endsnippet

snippet truncatewordshtml "" bi
truncatewords_html:${1}
endsnippet

snippet urlizetrunc "" bi
urlizetrunc:${1}
endsnippet

snippet wordwrap "" bi
wordwrap:${1}
endsnippet

# vim:ft=snippets: