summaryrefslogtreecommitdiff
path: root/snippets/django-html.json
diff options
context:
space:
mode:
Diffstat (limited to 'snippets/django-html.json')
-rw-r--r--snippets/django-html.json66
1 files changed, 66 insertions, 0 deletions
diff --git a/snippets/django-html.json b/snippets/django-html.json
new file mode 100644
index 0000000..2193d82
--- /dev/null
+++ b/snippets/django-html.json
@@ -0,0 +1,66 @@
1{
2 // Place your snippets for django-html here. Each snippet is defined under a snippet name and has a prefix, body and
3 // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
4 // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
5 // same ids are connected.
6 // Example:
7 // "Print to console": {
8 // "prefix": "log",
9 // "body": [
10 // "console.log('$1');",
11 // "$2"
12 // ],
13 // "description": "Log output to console"
14 // }
15 //
16 // You can also restrict snippets to specific files using include/exclude patterns:
17 // "Test snippet": {
18 // "prefix": "test",
19 // "body": "test('$1', () => {\n\t$0\n});",
20 // "include": ["**/*.test.ts", "*.spec.ts"],
21 // "exclude": ["**/temp/*.ts"],
22 // "description": "Insert test block"
23 // }
24
25 "django-comment": {
26 "prefix": "#",
27 "body": "{% comment \"${1:note}\" %}$0{% endcomment %}"
28 },
29 "django-else": {
30 "prefix": "el",
31 "body": "{% else %}"
32 },
33 "django-endif": {
34 "prefix": "ef",
35 "body": "{% endif %}"
36 },
37 "django-for": {
38 "prefix": "for",
39 "body": "{% for ${1:condition} %}\n$0\n{% endfor %}"
40 },
41 "django-if": {
42 "prefix": "if",
43 "body": "{% if ${1:condition} %}$0{% endif %}"
44 },
45 "django-ifelse": {
46 "prefix": "ife",
47 "body": "{% if ${1:condition} %}$0{% else %}{% endif %}"
48 },
49 "django-translate": {
50 "prefix": "tr",
51 "body": "{% trans \"$0\" %}"
52 },
53 "django-url": {
54 "prefix": "url",
55 "body": "{% url $0 %}"
56 },
57 "django-variable": {
58 "prefix": "v",
59 "body": "{{ $0 }}"
60 },
61 "tag": {
62 "prefix": "t",
63 "body": "<${1:tag}>$2</$1>$0"
64 }
65
66} \ No newline at end of file