Browse Source

more django things (and a bit of "visual" use)

master
Julio Biason 10 years ago
parent
commit
7ecb2216a9
  1. 20
      UltiSnips/jinja.snippets

20
UltiSnips/jinja.snippets

@ -1,4 +1,4 @@
snippet if "If block" snippet if "If block" i
{% if ${1:condition} %} {% if ${1:condition} %}
$0 $0
{% endif %} {% endif %}
@ -10,6 +10,20 @@ snippet for "For loop"
{% endfor %} {% endfor %}
endsnippet endsnippet
snippet static "Django static route" snippet static "Django static route" i
{% static "${1:path}" %} {% static '$0' %}
endsnippet
snippet url "Django URL resolver" i
{% url '$0' %}
endsnippet
snippet csrf "Django CSRF token"
{% csrf_token %}$0
endsnippet
snippet spaceless "Remove spaces (uses visual)"
{% spaceless %}
${0:${VISUAL}}
{% endspaceless %}
endsnippet endsnippet

Loading…
Cancel
Save