vim:syn:md: Conceal numeric footnotes

Conceal numeric footnotes with superscript numbers. The whole thing is a
bit of a gimmick since only single digit numbers are concealed but I had
this idea for quite some time and wanted to execute it.

When not put into the `after/` directory, the matches are overwritten by
the `markdownFootnote` group.
This commit is contained in:
2025-08-12 12:40:13 +02:00
parent a3e83e4844
commit 3fb5b5f376

View File

@@ -0,0 +1,11 @@
" Either not at the start of the line, or otherwise not followed by a colon
syntax match markdownFootnoteZero /\v(.\zs\[\^0\])|(^\[\^0\]\ze([^:]|$))/ conceal cchar=
syntax match markdownFootnoteOne /\v(.\zs\[\^1\])|(^\[\^1\]\ze([^:]|$))/ conceal cchar=¹
syntax match markdownFootnoteTwo /\v(.\zs\[\^2\])|(^\[\^2\]\ze([^:]|$))/ conceal cchar=²
syntax match markdownFootnoteThree /\v(.\zs\[\^3\])|(^\[\^3\]\ze([^:]|$))/ conceal cchar=³
syntax match markdownFootnoteFour /\v(.\zs\[\^4\])|(^\[\^4\]\ze([^:]|$))/ conceal cchar=
syntax match markdownFootnoteFive /\v(.\zs\[\^5\])|(^\[\^5\]\ze([^:]|$))/ conceal cchar=
syntax match markdownFootnoteSix /\v(.\zs\[\^6\])|(^\[\^6\]\ze([^:]|$))/ conceal cchar=
syntax match markdownFootnoteSeven /\v(.\zs\[\^7\])|(^\[\^7\]\ze([^:]|$))/ conceal cchar=
syntax match markdownFootnoteEight /\v(.\zs\[\^8\])|(^\[\^8\]\ze([^:]|$))/ conceal cchar=
syntax match markdownFootnoteNine /\v(.\zs\[\^9\])|(^\[\^9\]\ze([^:]|$))/ conceal cchar=