Files
dotfiles/.config/vim/after/syntax/markdown.vim
Julian Prein 3fb5b5f376 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.
2025-08-12 12:59:33 +02:00

12 lines
1003 B
VimL

" 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=