[education/rkward/snippets] rkward: Simplify implementation of "static" snippets. Some renames to keep logically related snippets sorted next to each other.
Thomas Friedrichsmeier
null at kde.org
Sat Jun 18 21:33:08 BST 2022
Git commit 2da0a9e2cf157e4a5febd46f61e3bb79893ea6d0 by Thomas Friedrichsmeier.
Committed on 18/06/2022 at 20:31.
Pushed by tfry into branch 'snippets'.
Simplify implementation of "static" snippets. Some renames to keep logically related snippets sorted next to each other.
M +16 -16 rkward/RKWardRMd.xml
https://invent.kde.org/education/rkward/commit/2da0a9e2cf157e4a5febd46f61e3bb79893ea6d0
diff --git a/rkward/RKWardRMd.xml b/rkward/RKWardRMd.xml
index fb65f8de..3ae2112c 100644
--- a/rkward/RKWardRMd.xml
+++ b/rkward/RKWardRMd.xml
@@ -69,20 +69,24 @@ function rangeCommand(command, def) {
<fillin>${rangeCommand("\n$H~2~O$\n")}</fillin>
</item>
<item>
- <match>Endasch</match>
- <fillin>${rangeCommand("\n--\n")}</fillin>
+ <match>En dash</match>
+ <fillin>--</fillin>
</item>
<item>
- <match>Emdasch</match>
- <fillin>${rangeCommand("\n---\n")}</fillin>
+ <match>Em dash</match>
+ <fillin>---</fillin>
</item>
<item>
- <match>Equantion</match>
- <fillin>${rangeCommand("\n$e^" + braces("i\\pi")+ " + 1$\n")}</fillin>
+ <match>Equation (inline)</match>
+ <fillin>
+$e^${braces("i\\pi")} + 1$
+</fillin>
</item>
<item>
- <match>Equantion Block</match>
- <fillin>${rangeCommand("\n$$e^ " + braces("i\\pi")+ " + 1$$\n")}</fillin>
+ <match>Equation (block)</match>
+ <fillin>
+$$e^${braces("i\\pi")} + 1$$
+</fillin>
</item>
<item>
<match>Strikethrough</match>
@@ -94,18 +98,14 @@ function rangeCommand(command, def) {
</item>
<item>
<match>rmarkdown::render()</match>
- <fillin>${rangeCommand("rmarkdown::render()")}</fillin>
+ <fillin>rmarkdown::render()</fillin>
</item>
<item>
- <match>Inline Code</match>
+ <match>Code (inline)</match>
<fillin>${rangeCommand("`r %%1`", "paste(\"The sum of 1 to 1000 is\", sum(1L:1000))")}</fillin>
- </item>
- <item>
- <match>Code_Block</match>
- <fillin>${rangeCommand("\n```%%1```\n", "\nx <- 1\n")}</fillin>
</item>
<item>
- <match>Chunck (Simple)</match>
+ <match>Code (simple chunk)</match>
<fillin>${rangeCommand("\n```"+ braces("r") +" %%1```\n", "\nx <- 1\n\n")}</fillin>
</item>
<item>
@@ -113,7 +113,7 @@ function rangeCommand(command, def) {
<fillin>${rangeCommand("> %%1", "Text")}</fillin>
</item>
<item>
- <match>Chunck (defaults)</match>
+ <match>Code (chunk with defaults)</match>
<fillin>${rangeCommand("\n```"+ braces("r, echo = FALSE, eval = FALSE, fig.show = \"hide\", include = FALSE, message = FALSE, results = \"hide\", warning = FALSE") +" %%1```\n", "\nx <- 1\n\n")}</fillin>
</item>
</snippets>
More information about the rkward-tracker
mailing list