Skip to content

Commit

Permalink
Create snippets for reStructuredText (#441)
Browse files Browse the repository at this point in the history
* feat(rst): add snippets for restructuredtext
  • Loading branch information
unrealapex authored May 16, 2024
1 parent 3e9a3f5 commit 66dea58
Show file tree
Hide file tree
Showing 2 changed files with 119 additions and 0 deletions.
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,10 @@
{
"language": "beancount",
"path": "./snippets/beancount.json"
},
{
"language": "rst",
"path": "./snippets/rst.json"
}
]
}
Expand Down
115 changes: 115 additions & 0 deletions snippets/rst.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
{
"main title": {
"prefix": ["main title", "="],
"body": ["============================\n${0}\n============================\n\n"],
"description": "Add main title"
},
"title": {
"prefix": ["title", "="],
"body": ["${0}\n============================\n\n"],
"description": "Add title"
},
"section": {
"prefix": ["section", "-"],
"body": ["${0}\n------------\n\n"],
"description": "Add section"
},
"Links": {
"prefix": ["l", "link", "hyperlink"],
"body": ["${1:text}_\n.. _${1:text} ${2:url}${0}"],
"description": "Add links"
},
"URLS": {
"prefix": ["u", "url"],
"body": ["<${1}> ${0}"],
"description": "Add urls"
},
"Images": {
"prefix": "img",
"body": [".. image:: ${1:path}${0}"],
"description": "Add images"
},
"Insert strong emphasized text": {
"prefix": ["bold", "b", "strong emphasis"],
"body": "**${1}** $0",
"description": "Insert bold text"
},
"Insert emphasized text": {
"prefix": ["i", "italic", "emphasis"],
"body": "*${1}* $0",
"description": "Insert italic text"
},
"Insert quoted text": {
"prefix": "quote",
"body": "::\n\n ${1}",
"description": "Insert quoted text"
},
"Insert code": {
"prefix": ["code", "literal"],
"body": "`${1}` $0",
"description": "Insert code"
},
"Insert code block": {
"prefix": "codeblock",
"body": ["::\n $0"],
"description": "Insert code block"
},
"Insert unordered list": {
"prefix": "unordered list",
"body": ["- ${1:first}", "- ${2:second}", "- ${3:third}", "$0"],
"description": "Insert unordered list"
},
"Insert ordered list": {
"prefix": "ordered list",
"body": ["1. ${1:first}", "2. ${2:second}", "3. ${3:third}", "$0"],
"description": "Insert ordered list"
},
"Insert transition": {
"prefix": ["horizontal rule", "transition"],
"body": "----------\n\n",
"description": "Insert transition rule"
},
"Insert task list": {
"prefix": "task",
"body": ["- [${1| ,x|}] ${2:text}", "${0}"],
"description": "Insert task list"
},
"Insert task list 2": {
"prefix": "task2",
"body": ["- [${1| ,x|}] ${2:text}", "- [${3| ,x|}] ${4:text}", "${0}"],
"description": "Insert task list with 2 tasks"
},
"Insert task list 3": {
"prefix": "task3",
"body": [
"- [${1| ,x|}] ${2:text}",
"- [${3| ,x|}] ${4:text}",
"- [${5| ,x|}] ${6:text}",
"${0}"
],
"description": "Insert task list with 3 tasks"
},
"Insert task list 4": {
"prefix": "task4",
"body": [
"- [${1| ,x|}] ${2:text}",
"- [${3| ,x|}] ${4:text}",
"- [${5| ,x|}] ${6:text}",
"- [${7| ,x|}] ${8:text}",
"${0}"
],
"description": "Insert task list with 4 tasks"
},
"Insert task list 5": {
"prefix": "task5",
"body": [
"- [${1| ,x|}] ${2:text}",
"- [${3| ,x|}] ${4:text}",
"- [${5| ,x|}] ${6:text}",
"- [${7| ,x|}] ${8:text}",
"- [${9| ,x|}] ${10:text}",
"${0}"
],
"description": "Insert task list with 5 tasks"
}
}

0 comments on commit 66dea58

Please sign in to comment.