From 3fb5b5f376b060c83954fa4b8fc2edde442cc5a7 Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Tue, 12 Aug 2025 12:40:13 +0200 Subject: [PATCH] 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. --- .config/vim/after/syntax/markdown.vim | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .config/vim/after/syntax/markdown.vim diff --git a/.config/vim/after/syntax/markdown.vim b/.config/vim/after/syntax/markdown.vim new file mode 100644 index 0000000..218b100 --- /dev/null +++ b/.config/vim/after/syntax/markdown.vim @@ -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=⁹