nvim: Change snippets to vscode json style
Translated markdown snippets to json style. Could completely remove quarto snippets since they are integrated into friendly snippets by now.
This commit is contained in:
parent
36936142f6
commit
03a68a9fdb
3 changed files with 27 additions and 175 deletions
27
nvim/.config/nvim/snippets/markdown.json
Normal file
27
nvim/.config/nvim/snippets/markdown.json
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
"Footnote": {
|
||||||
|
"prefix": "fn",
|
||||||
|
"body": ["[^${1:id}]${0}", "", "[^${1:id}]: ${2:text}"],
|
||||||
|
"description": "insert footnote"
|
||||||
|
},
|
||||||
|
"italic": {
|
||||||
|
"prefix": "italic",
|
||||||
|
"body": ["_${0}_"],
|
||||||
|
"description": "surround with italics"
|
||||||
|
},
|
||||||
|
"sup": {
|
||||||
|
"prefix": "sup",
|
||||||
|
"body": ["^${0}^"],
|
||||||
|
"description": "superscript"
|
||||||
|
},
|
||||||
|
"frontmatter": {
|
||||||
|
"prefix": "frontmatter",
|
||||||
|
"body": ["---", "${0}", "---"],
|
||||||
|
"description": "insert footnote"
|
||||||
|
},
|
||||||
|
"blog frontmatter": {
|
||||||
|
"prefix": "blogfront",
|
||||||
|
"body": ["---", "title: ${1:title}", "description: ${2: desc}", "pubDate: ${3:date}", "tags: ${4:tags}", "${0}", "---"],
|
||||||
|
"description": "add frontmatter"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,80 +0,0 @@
|
||||||
# Markdown snippets
|
|
||||||
# Combination of snips from friendly-snippets and vim-snippets repos
|
|
||||||
|
|
||||||
snippet h1 Heading level 1
|
|
||||||
# ${0}
|
|
||||||
|
|
||||||
snippet h2 Heading level 2
|
|
||||||
## ${0}
|
|
||||||
|
|
||||||
snippet h3 Heading level 3
|
|
||||||
### ${0}
|
|
||||||
|
|
||||||
snippet h4 Heading level 4
|
|
||||||
#### ${0}
|
|
||||||
|
|
||||||
snippet h5 Heading level 5
|
|
||||||
##### ${0}
|
|
||||||
|
|
||||||
snippet h6 Heading level 6
|
|
||||||
##### ${0}
|
|
||||||
|
|
||||||
snippet ] Link
|
|
||||||
[${1:text}](${2:link})
|
|
||||||
|
|
||||||
snippet ]h Weblink
|
|
||||||
[${1:text}](https://${2:address})
|
|
||||||
|
|
||||||
snippet ]c Link filled with clipboard contents
|
|
||||||
[${1:text}](${2:`@+`})
|
|
||||||
|
|
||||||
snippet ]: Link reference style
|
|
||||||
[${1:id}]: ${2:text}
|
|
||||||
|
|
||||||
snippet ]] Footnote
|
|
||||||
[^${1:id}]${0}
|
|
||||||
|
|
||||||
[^${1:id}]: ${2:text}
|
|
||||||
|
|
||||||
snippet img Image link
|
|
||||||

|
|
||||||
|
|
||||||
snippet imgc Image link with clipboard content
|
|
||||||

|
|
||||||
|
|
||||||
snippet ** Bold
|
|
||||||
**$0**
|
|
||||||
snippet __ Bold
|
|
||||||
__$0__
|
|
||||||
snippet --- Frontmatter
|
|
||||||
---
|
|
||||||
$0
|
|
||||||
---
|
|
||||||
|
|
||||||
# codeblocks
|
|
||||||
snippet `` Codeblock with language
|
|
||||||
\`\`\`${1:language}
|
|
||||||
${2:code}
|
|
||||||
\`\`\`
|
|
||||||
|
|
||||||
# table
|
|
||||||
snippet tb Simple table
|
|
||||||
| ${5:factors} | ${1:a} | ${2:b} |
|
|
||||||
| ------------- |------------- | ------- |
|
|
||||||
| ${3:f1} | ${0} | N |
|
|
||||||
| ${4:f2} | N | N |
|
|
||||||
|
|
||||||
# tasklists
|
|
||||||
snippet tl Tasklist item
|
|
||||||
- [ ] ${0:item}
|
|
||||||
|
|
||||||
snippet tl3 Tasklist item
|
|
||||||
- [ ] ${1:item}
|
|
||||||
- [ ] ${2:item}
|
|
||||||
- [ ] ${0:item}
|
|
||||||
|
|
||||||
# super/subscript - pandoc/extended markdown only
|
|
||||||
snippet sub Subscript
|
|
||||||
~${0}~
|
|
||||||
snippet sup Superscript
|
|
||||||
^${0}^
|
|
||||||
|
|
@ -1,95 +0,0 @@
|
||||||
# Quarto extensions to markdown
|
|
||||||
|
|
||||||
extends markdown
|
|
||||||
|
|
||||||
# definitions list
|
|
||||||
snippet : Definition list
|
|
||||||
$1
|
|
||||||
: $0
|
|
||||||
|
|
||||||
snippet `` Codecell with language
|
|
||||||
\`\`\`{${1:language}}
|
|
||||||
${2:code}
|
|
||||||
\`\`\`
|
|
||||||
|
|
||||||
snippet ``p Codecell with language
|
|
||||||
\`\`\`{python}
|
|
||||||
${2:code}
|
|
||||||
\`\`\`
|
|
||||||
|
|
||||||
snippet ``r Codecell with language
|
|
||||||
\`\`\`{r}
|
|
||||||
${2:code}
|
|
||||||
\`\`\`
|
|
||||||
|
|
||||||
snippet pyfig2 Sub-Figures from python codecell
|
|
||||||
\`\`\`{python}
|
|
||||||
#| label: fig-${1:label}
|
|
||||||
#| fig-cap: "${2:caption}"
|
|
||||||
#| fig-subcap:
|
|
||||||
#| - "${3:subcap1}"
|
|
||||||
#| - "${3:subcap2}"
|
|
||||||
#| layout-ncol: 2
|
|
||||||
|
|
||||||
${0:code}
|
|
||||||
\`\`\`
|
|
||||||
|
|
||||||
snippet pyfig Figure from python codecell
|
|
||||||
\`\`\`{python}
|
|
||||||
#| label: fig-${1:label}
|
|
||||||
#| fig-cap: "${2:caption}"
|
|
||||||
|
|
||||||
${0:code}
|
|
||||||
\`\`\`
|
|
||||||
|
|
||||||
snippet fig General figure
|
|
||||||
{#fig-${2:label}}
|
|
||||||
|
|
||||||
snippet pytab Figure from python codecell
|
|
||||||
\`\`\`{python}
|
|
||||||
#| label: tbl-${1:label}
|
|
||||||
#| tbl-cap: "${2:caption}"
|
|
||||||
|
|
||||||
${0:code}
|
|
||||||
\`\`\`
|
|
||||||
|
|
||||||
snippet fref Figure crossref
|
|
||||||
@fig-${1:label}
|
|
||||||
snippet tref Table crossref
|
|
||||||
@tbl-${1:label}
|
|
||||||
snippet sref Section crossref
|
|
||||||
@sec-${1:label}
|
|
||||||
snippet eref Equation crossref
|
|
||||||
@eq-${1:label}
|
|
||||||
|
|
||||||
snippet cite Citation
|
|
||||||
[@${1:bib-key}]
|
|
||||||
|
|
||||||
snippet shortcode Shortcode
|
|
||||||
{{< $0 >}}
|
|
||||||
|
|
||||||
snippet div Div block
|
|
||||||
::: {.${1:class}}
|
|
||||||
$0
|
|
||||||
:::
|
|
||||||
|
|
||||||
snippet note Callout note
|
|
||||||
::: {.callout-note}
|
|
||||||
$0
|
|
||||||
:::
|
|
||||||
snippet warn Callout warning
|
|
||||||
::: {.callout-warning}
|
|
||||||
$0
|
|
||||||
:::
|
|
||||||
snippet import Callout important
|
|
||||||
::: {.callout-important}
|
|
||||||
$0
|
|
||||||
:::
|
|
||||||
snippet tip Callout tip
|
|
||||||
::: {.callout-tip}
|
|
||||||
$0
|
|
||||||
:::
|
|
||||||
snippet caut Callout caution
|
|
||||||
::: {.callout-caution}
|
|
||||||
$0
|
|
||||||
:::
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue