dotfiles/nvim/.config/nvim/snippets/markdown.snippets
Marty Oehme 8dbfa2dd13
nvim: Extend snippet capability
Enabled snippet completion from the first letter (allowing single letter
snippet prefixes).
Extended the luasnip usage and added a telescope extension to show all
enabled snippets for the current buffer.
2024-06-17 13:34:02 +02:00

80 lines
1.5 KiB
Text

# 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
![${1:alt}](${2:link})
snippet imgc Image link with clipboard content
![${1:alt}](${2:`@+`})
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}^