Skip to content
Merged
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
56a1916
Added some useful Rmd snippets
jooyoungseo Feb 20, 2022
2aff06f
Fixed closing fence of the reference list snippet
jooyoungseo Feb 20, 2022
293bb53
Added a missing $0 in the speaker notes snippet
jooyoungseo Feb 20, 2022
91032ed
Added dynamic choices to code chunk
jooyoungseo Feb 21, 2022
946c415
Removed doubled $0 from speaker notes
jooyoungseo Feb 22, 2022
3171517
Added bookdown theorem snippet
jooyoungseo Feb 22, 2022
0b30da1
Added cross-reference bookdown theorem snippet
jooyoungseo Feb 22, 2022
5466701
Added incremental list snippet
jooyoungseo Feb 22, 2022
a11d493
Added nonincremental list snippet
jooyoungseo Feb 22, 2022
afa8514
Added blank lines before and after fence div blocks, following Pandoc…
jooyoungseo Feb 22, 2022
3fbca68
Added ordered and unordered item snippets
jooyoungseo Feb 22, 2022
f923c2e
Added superscript snippet
jooyoungseo Feb 25, 2022
9a38f94
Added subscript snippet
jooyoungseo Feb 25, 2022
0ddb262
Added strikeout snippet
jooyoungseo Feb 27, 2022
0974506
Added checked and unchecked item snippets
jooyoungseo Feb 27, 2022
880003b
Added task list snippet
jooyoungseo Feb 27, 2022
da60b90
Merge branch 'master' into snippet
jooyoungseo Mar 2, 2022
0ee17b5
Added incremental fenced block snippet
jooyoungseo Mar 2, 2022
dc41531
Added nonincremental fenced block snippet
jooyoungseo Mar 2, 2022
79094e6
Merge branch 'master' into snippet
jooyoungseo Mar 5, 2022
94e70cb
Added Theorem prefix
jooyoungseo Mar 5, 2022
d4305c4
Added bookdown lemma snippet
jooyoungseo Mar 6, 2022
956709e
Added bookdown corollary snippet
jooyoungseo Mar 6, 2022
7a88fbc
Added bookdown proposition snippet
jooyoungseo Mar 6, 2022
7955bb4
Added conjecture snippet
jooyoungseo Mar 6, 2022
e06cfc9
Added bookdown definition snippet
jooyoungseo Mar 6, 2022
5ba214c
Added bookdown example snippet
jooyoungseo Mar 6, 2022
09a3933
Added bookdown exercise snippet
jooyoungseo Mar 6, 2022
72e4947
Added bookdown hypothesis snippet
jooyoungseo Mar 6, 2022
f629e9a
Added bookdown equation snippet
jooyoungseo Mar 6, 2022
f84d17d
Added bookdown table snippet
jooyoungseo Mar 6, 2022
91fa6b4
Added bookdown figure snippet
jooyoungseo Mar 6, 2022
3218186
Removed typo right-paren
jooyoungseo Mar 6, 2022
25ff68a
Removed typo 3
jooyoungseo Mar 6, 2022
d5e46c8
Added bookdown section label snippet
jooyoungseo Mar 6, 2022
393b020
Added bookdown numbered and unnumbered part snippet
jooyoungseo Mar 6, 2022
ddc4863
Added bookdown appendix snippet
jooyoungseo Mar 6, 2022
7a04517
Added figure chunk snippet
jooyoungseo Mar 6, 2022
fc99eb1
Fixed figure chunk snippet
jooyoungseo Mar 6, 2022
cfc42ea
Added missing right-brace
jooyoungseo Mar 6, 2022
e77610d
Added external figure chunk
jooyoungseo Mar 6, 2022
f839a74
Added selected text to incremental and nonincremental fenced blocks
jooyoungseo Mar 6, 2022
ebbda8b
Fix newline
renkun-ken Mar 6, 2022
da8c176
Revert code chunk snippet for future re-visit
renkun-ken Mar 6, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
370 changes: 370 additions & 0 deletions snippets/rmarkdown.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,21 @@
"body": "*${1:${TM_SELECTED_TEXT}}*$0",
"description": "Insert italic text"
},
"Insert superscript": {
"prefix": "superscript",
"body": "^${1:${TM_SELECTED_TEXT}}^$0",
"description": "Insert superscript"
},
"Insert subscript": {
"prefix": "subscript",
"body": "~${1:${TM_SELECTED_TEXT}}~$0",
"description": "Insert subscript"
},
"Insert strikeout": {
"prefix": "strikeout",
"body": "~~${1:${TM_SELECTED_TEXT}}~~$0",
"description": "Insert strikeout"
},
"Insert quoted text": {
"prefix": "quote",
"body": "> ${1:${TM_SELECTED_TEXT}}",
Expand Down Expand Up @@ -53,6 +68,36 @@
],
"description": "Insert ordered list"
},
"Insert unordered item": {
"prefix": "unordered item",
"body": "- ${1:${TM_SELECTED_TEXT}}",
"description": "Insert unordered item"
},
"Insert ordered item": {
"prefix": "ordered item",
"body": "1. ${1:${TM_SELECTED_TEXT}}",
"description": "Insert ordered item"
},
"Insert task list": {
"prefix": "task list",
"body": [
"- [${1|x, |}] ${2:first}",
"- [${3|x, |}] ${4:second}",
"- [${5|x, |}] ${6:third}",
"$0"
],
"description": "Insert task list"
},
"Insert checked item": {
"prefix": "checked item",
"body": "- [x] ${1:${TM_SELECTED_TEXT}}",
"description": "Insert checked item"
},
"Insert unchecked item": {
"prefix": "unchecked item",
"body": "- [ ] ${1:${TM_SELECTED_TEXT}}",
"description": "Insert unchecked item"
},
"Insert horizontal rule": {
"prefix": "horizontal rule",
"body": "----------\n",
Expand Down Expand Up @@ -85,5 +130,330 @@
"```"
],
"description": "Insert R code chunk"
},
"Insert inline R code": {
"prefix": "inline r code",
"body": "`r ${1:${TM_SELECTED_TEXT}}`$0",
"description": "Insert inline R code"
},
"Insert inline footnotes": {
"prefix": "inline footnotes",
"body": "^[${1:Inline footnotes text.}]$0",
"description": "Insert inline footnotes"
},
"Insert speaker notes": {
"prefix": "speaker notes",
"body": [
"::: notes",
"",
"${TM_SELECTED_TEXT}$0",
"",
":::"
],
"description": "Insert speaker notes"
},
"Insert two columns": {
"prefix": "two columns",
"body": [
":::::: {.columns}",
"::: {.column}",
"",
"${1:Content of the left column.}",
"",
":::",
"::: {.column}",
"",
"${2:Content of the right column.}",
"",
":::",
"::::::$0"
],
"description": "Insert (side-by-side) two columns"
},
"Insert incremental list": {
"prefix": "incremental list",
"body": [
"::: incremental",
"",
"- ${1:first}",
"- ${2:second}",
"- ${3:third}",
"$0",
"",
":::"
],
"description": "Insert incremental list"
},
"Insert nonincremental list": {
"prefix": "nonincremental list",
"body": [
"::: nonincremental",
"",
"- ${1:first}",
"- ${2:second}",
"- ${3:third}",
"$0",
"",
":::"
],
"description": "Insert nonincremental list"
},
"Insert incremental fenced block": {
"prefix": "incremental fenced block",
"body": [
"::: incremental",
"",
"${1:${TM_SELECTED_TEXT}}$0",
"",
":::"
],
"description": "Insert incremental fenced block"
},
"Insert nonincremental fenced block": {
"prefix": "nonincremental fenced block",
"body": [
"::: nonincremental",
"",
"${1:${TM_SELECTED_TEXT}}$0",
"",
":::"
],
"description": "Insert nonincremental fenced block"
},
"Insert reference list": {
"prefix": "reference list",
"body": [
"::: {#refs}",
":::$0"
],
"description": "Insert reference list"
},
"Insert bookdown theorem": {
"prefix": "theorem",
"body": [
"::: {.theorem #${1:label} name=\"${2:theorem name}\"}",
"${TM_SELECTED_TEXT}$0",
":::"
],
"description": "Insert bookdown theorem"
},
"Cross-reference bookdown theorem": {
"prefix": "cross-reference theorem",
"body": [
"Theorem \\@ref(thm:${1:label})$0"
],
"description": "Cross-reference bookdown theorem"
},
"Insert bookdown lemma": {
"prefix": "lemma",
"body": [
"::: {.lemma #${1:label} name=\"${2:lemma name}\"}",
"${TM_SELECTED_TEXT}$0",
":::"
],
"description": "Insert bookdown lemma"
},
"Cross-reference bookdown lemma": {
"prefix": "cross-reference lemma",
"body": [
"Lemma \\@ref(lem:${1:label})$0"
],
"description": "Cross-reference bookdown lemma"
},
"Insert bookdown corollary": {
"prefix": "corollary",
"body": [
"::: {.corollary #${1:label} name=\"${2:corollary name}\"}",
"${TM_SELECTED_TEXT}$0",
":::"
],
"description": "Insert bookdown corollary"
},
"Cross-reference bookdown corollary": {
"prefix": "cross-reference corollary",
"body": [
"Corollary \\@ref(cor:${1:label})$0"
],
"description": "Cross-reference bookdown corollary"
},
"Insert bookdown proposition": {
"prefix": "proposition",
"body": [
"::: {.proposition #${1:label} name=\"${2:proposition name}\"}",
"${TM_SELECTED_TEXT}$0",
":::"
],
"description": "Insert bookdown proposition"
},
"Cross-reference bookdown proposition": {
"prefix": "cross-reference proposition",
"body": [
"Proposition \\@ref(prp:${1:label})$0"
],
"description": "Cross-reference bookdown proposition"
},
"Insert bookdown conjecture": {
"prefix": "conjecture",
"body": [
"::: {.conjecture #${1:label} name=\"${2:conjecture name}\"}",
"${TM_SELECTED_TEXT}$0",
":::"
],
"description": "Insert bookdown conjecture"
},
"Cross-reference bookdown conjecture": {
"prefix": "cross-reference conjecture",
"body": [
"Conjecture \\@ref(cnj:${1:label})$0"
],
"description": "Cross-reference bookdown conjecture"
},
"Insert bookdown definition": {
"prefix": "definition",
"body": [
"::: {.definition #${1:label} name=\"${2:definition name}\"}",
"${TM_SELECTED_TEXT}$0",
":::"
],
"description": "Insert bookdown definition"
},
"Cross-reference bookdown definition": {
"prefix": "cross-reference definition",
"body": [
"Definition \\@ref(def:${1:label})$0"
],
"description": "Cross-reference bookdown definition"
},
"Insert bookdown example": {
"prefix": "example",
"body": [
"::: {.example #${1:label} name=\"${2:example name}\"}",
"${TM_SELECTED_TEXT}$0",
":::"
],
"description": "Insert bookdown example"
},
"Cross-reference bookdown example": {
"prefix": "cross-reference example",
"body": [
"Example \\@ref(exm:${1:label})$0"
],
"description": "Cross-reference bookdown example"
},
"Insert bookdown exercise": {
"prefix": "exercise",
"body": [
"::: {.exercise #${1:label} name=\"${2:exercise name}\"}",
"${TM_SELECTED_TEXT}$0",
":::"
],
"description": "Insert bookdown exercise"
},
"Cross-reference bookdown exercise": {
"prefix": "cross-reference exercise",
"body": [
"Exercise \\@ref(exr:${1:label})$0"
],
"description": "Cross-reference bookdown exercise"
},
"Insert bookdown hypothesis": {
"prefix": "hypothesis",
"body": [
"::: {.hypothesis #${1:label} name=\"${2:hypothesis name}\"}",
"${TM_SELECTED_TEXT}$0",
":::"
],
"description": "Insert bookdown hypothesis"
},
"Cross-reference bookdown hypothesis": {
"prefix": "cross-reference hypothesis",
"body": [
"Hypothesis \\@ref(hyp:${1:label})$0"
],
"description": "Cross-reference bookdown hypothesis"
},
"Insert bookdown equation": {
"prefix": "equation",
"body": [
"\\begin{equation}",
"${TM_SELECTED_TEXT}$0",
"(\\#eq:${1:label})",
"\\end{equation}"
],
"description": "Insert bookdown equation"
},
"Cross-reference bookdown equation": {
"prefix": "cross-reference equation",
"body": [
"Equation \\@ref(eq:${1:label})$0"
],
"description": "Cross-reference bookdown equation"
},
"Cross-reference bookdown table": {
"prefix": "cross-reference table",
"body": [
"Table \\@ref(tab:${1:label})$0"
],
"description": "Cross-reference bookdown table"
},
"Insert figure chunk": {
"prefix": "figure chunk",
"body": [
"```{r ${1:label}, fig.cap = \"${2:Figure caption.}\", fig.alt = \"${3:Alt text.}\"}",
"${TM_SELECTED_TEXT}$0",
"```"
],
"description": "Insert figure chunk"
},
"Insert external figure chunk": {
"prefix": "external figure chunk",
"body": [
"```{r ${1:label}, fig.cap = \"${2:Figure caption.}\", fig.alt = \"${3:Alt text.}\"}",
"knitr::include_graphics(\"${4:path/to/file.png}\")",
"```"
],
"description": "Insert external figure chunk"
},
"Cross-reference bookdown figure": {
"prefix": "cross-reference figure",
"body": [
"Figure \\@ref(fig:${1:label})$0"
],
"description": "Cross-reference bookdown figure"
},
"Insert bookdown section label": {
"prefix": "section label",
"body": [
"${TM_SELECTED_TEXT} {#${1:label}}$0"
],
"description": "Insert bookdown section label"
},
"Cross-reference bookdown section": {
"prefix": "cross-reference section",
"body": [
"Section \\@ref(${1:label})$0"
],
"description": "Cross-reference bookdown section"
},
"Insert bookdown part": {
"prefix": "part",
"body": [
"# (PART) Part ${1:I} {-}$0"
],
"description": "Insert bookdown part"
},
"Insert unnumbered bookdown part": {
"prefix": "unnumbered part",
"body": [
"# (PART\\*) Part ${1:I} {-}$0"
],
"description": "Insert bookdown unnumbered part"
},
"Insert bookdown appendix": {
"prefix": "appendix",
"body": [
"# (APPENDIX) Appendix {-}$0"
],
"description": "Insert bookdown appendix"
}
}