From b39d777fd5e620eeb81733ae12292813233b529a Mon Sep 17 00:00:00 2001 From: Simeon Simeonov Date: Sun, 17 Jun 2018 13:02:27 +0200 Subject: Simplify Django-snippets. Add django_var --- .emacs.d/snippets/html-mode/django_for | 6 ++++-- .emacs.d/snippets/html-mode/django_if | 4 ++-- .emacs.d/snippets/html-mode/django_ife | 2 +- .emacs.d/snippets/html-mode/django_translate | 2 +- .emacs.d/snippets/html-mode/django_url | 2 +- .emacs.d/snippets/html-mode/django_var | 5 +++++ 6 files changed, 14 insertions(+), 7 deletions(-) create mode 100644 .emacs.d/snippets/html-mode/django_var diff --git a/.emacs.d/snippets/html-mode/django_for b/.emacs.d/snippets/html-mode/django_for index 7982638..41ad68f 100644 --- a/.emacs.d/snippets/html-mode/django_for +++ b/.emacs.d/snippets/html-mode/django_for @@ -1,5 +1,7 @@ # -*- mode: snippet -*- #name: django-for -#key: dj_for +#key: for # -- -{% for ${1:condition} %}$0{% endfor %} \ No newline at end of file +{%for ${1:condition} %} +$0 +{%endfor%} \ No newline at end of file diff --git a/.emacs.d/snippets/html-mode/django_if b/.emacs.d/snippets/html-mode/django_if index a356c35..6ad562d 100644 --- a/.emacs.d/snippets/html-mode/django_if +++ b/.emacs.d/snippets/html-mode/django_if @@ -1,5 +1,5 @@ # -*- mode: snippet -*- #name: django-if -#key: dj_if +#key: if # -- -{% if ${1:condition} %}$0{% endif %} \ No newline at end of file +{%if ${1:condition} %}$0{%endif%} \ No newline at end of file diff --git a/.emacs.d/snippets/html-mode/django_ife b/.emacs.d/snippets/html-mode/django_ife index 8b896b1..7d64b19 100644 --- a/.emacs.d/snippets/html-mode/django_ife +++ b/.emacs.d/snippets/html-mode/django_ife @@ -1,5 +1,5 @@ # -*- mode: snippet -*- #name: django-ifelse -#key: dj_ife +#key: ife # -- {%if ${1:condition} %}$0{%else%}{%endif%} \ No newline at end of file diff --git a/.emacs.d/snippets/html-mode/django_translate b/.emacs.d/snippets/html-mode/django_translate index 9f11b2e..22dbc0c 100644 --- a/.emacs.d/snippets/html-mode/django_translate +++ b/.emacs.d/snippets/html-mode/django_translate @@ -1,5 +1,5 @@ # -*- mode: snippet -*- #name: django-translate -#key: dj_tr +#key: tr # -- {%trans "$0" %} \ No newline at end of file diff --git a/.emacs.d/snippets/html-mode/django_url b/.emacs.d/snippets/html-mode/django_url index 846b8fb..525385f 100644 --- a/.emacs.d/snippets/html-mode/django_url +++ b/.emacs.d/snippets/html-mode/django_url @@ -1,5 +1,5 @@ # -*- mode: snippet -*- #name: django-url -#key: dj_u +#key: url # -- {%url $0 %} \ No newline at end of file diff --git a/.emacs.d/snippets/html-mode/django_var b/.emacs.d/snippets/html-mode/django_var new file mode 100644 index 0000000..90a685f --- /dev/null +++ b/.emacs.d/snippets/html-mode/django_var @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +#name: django-variable +#key: v +# -- +{{ $0 }} \ No newline at end of file -- cgit v1.3