Skip to content

Commit 66dea58

Browse files
authored
Create snippets for reStructuredText (rafamadriz#441)
* feat(rst): add snippets for restructuredtext
1 parent 3e9a3f5 commit 66dea58

File tree

2 files changed

+119
-0
lines changed

2 files changed

+119
-0
lines changed

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,10 @@
567567
{
568568
"language": "beancount",
569569
"path": "./snippets/beancount.json"
570+
},
571+
{
572+
"language": "rst",
573+
"path": "./snippets/rst.json"
570574
}
571575
]
572576
}

snippets/rst.json

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
{
2+
"main title": {
3+
"prefix": ["main title", "="],
4+
"body": ["============================\n${0}\n============================\n\n"],
5+
"description": "Add main title"
6+
},
7+
"title": {
8+
"prefix": ["title", "="],
9+
"body": ["${0}\n============================\n\n"],
10+
"description": "Add title"
11+
},
12+
"section": {
13+
"prefix": ["section", "-"],
14+
"body": ["${0}\n------------\n\n"],
15+
"description": "Add section"
16+
},
17+
"Links": {
18+
"prefix": ["l", "link", "hyperlink"],
19+
"body": ["${1:text}_\n.. _${1:text} ${2:url}${0}"],
20+
"description": "Add links"
21+
},
22+
"URLS": {
23+
"prefix": ["u", "url"],
24+
"body": ["<${1}> ${0}"],
25+
"description": "Add urls"
26+
},
27+
"Images": {
28+
"prefix": "img",
29+
"body": [".. image:: ${1:path}${0}"],
30+
"description": "Add images"
31+
},
32+
"Insert strong emphasized text": {
33+
"prefix": ["bold", "b", "strong emphasis"],
34+
"body": "**${1}** $0",
35+
"description": "Insert bold text"
36+
},
37+
"Insert emphasized text": {
38+
"prefix": ["i", "italic", "emphasis"],
39+
"body": "*${1}* $0",
40+
"description": "Insert italic text"
41+
},
42+
"Insert quoted text": {
43+
"prefix": "quote",
44+
"body": "::\n\n ${1}",
45+
"description": "Insert quoted text"
46+
},
47+
"Insert code": {
48+
"prefix": ["code", "literal"],
49+
"body": "`${1}` $0",
50+
"description": "Insert code"
51+
},
52+
"Insert code block": {
53+
"prefix": "codeblock",
54+
"body": ["::\n $0"],
55+
"description": "Insert code block"
56+
},
57+
"Insert unordered list": {
58+
"prefix": "unordered list",
59+
"body": ["- ${1:first}", "- ${2:second}", "- ${3:third}", "$0"],
60+
"description": "Insert unordered list"
61+
},
62+
"Insert ordered list": {
63+
"prefix": "ordered list",
64+
"body": ["1. ${1:first}", "2. ${2:second}", "3. ${3:third}", "$0"],
65+
"description": "Insert ordered list"
66+
},
67+
"Insert transition": {
68+
"prefix": ["horizontal rule", "transition"],
69+
"body": "----------\n\n",
70+
"description": "Insert transition rule"
71+
},
72+
"Insert task list": {
73+
"prefix": "task",
74+
"body": ["- [${1| ,x|}] ${2:text}", "${0}"],
75+
"description": "Insert task list"
76+
},
77+
"Insert task list 2": {
78+
"prefix": "task2",
79+
"body": ["- [${1| ,x|}] ${2:text}", "- [${3| ,x|}] ${4:text}", "${0}"],
80+
"description": "Insert task list with 2 tasks"
81+
},
82+
"Insert task list 3": {
83+
"prefix": "task3",
84+
"body": [
85+
"- [${1| ,x|}] ${2:text}",
86+
"- [${3| ,x|}] ${4:text}",
87+
"- [${5| ,x|}] ${6:text}",
88+
"${0}"
89+
],
90+
"description": "Insert task list with 3 tasks"
91+
},
92+
"Insert task list 4": {
93+
"prefix": "task4",
94+
"body": [
95+
"- [${1| ,x|}] ${2:text}",
96+
"- [${3| ,x|}] ${4:text}",
97+
"- [${5| ,x|}] ${6:text}",
98+
"- [${7| ,x|}] ${8:text}",
99+
"${0}"
100+
],
101+
"description": "Insert task list with 4 tasks"
102+
},
103+
"Insert task list 5": {
104+
"prefix": "task5",
105+
"body": [
106+
"- [${1| ,x|}] ${2:text}",
107+
"- [${3| ,x|}] ${4:text}",
108+
"- [${5| ,x|}] ${6:text}",
109+
"- [${7| ,x|}] ${8:text}",
110+
"- [${9| ,x|}] ${10:text}",
111+
"${0}"
112+
],
113+
"description": "Insert task list with 5 tasks"
114+
}
115+
}

0 commit comments

Comments
 (0)