Skip to content

Commit d8ce5d9

Browse files
author
Jorge Israel Peña
committed
add syntax highlighting and concealment for abbreviations
1 parent 7e35726 commit d8ce5d9

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

syntax/pandoc.vim

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,14 @@ syn match pandocCodePre /<pre>.\{-}<\/pre>/ skipnl
128128
syn match pandocCodePre /<code>.\{-}<\/code>/ skipnl
129129
" }}}
130130

131+
" Abbreviations: {{{1
132+
syn region pandocAbbreviationDefinition start=/^\*\[.\{-}\]:\s*/ end="$" contains=pandocNoFormatted,@Spell
133+
syn match pandocAbbreviationSeparator /:/ contained containedin=pandocAbbreviationDefinition conceal cchar=
134+
syn match pandocAbbreviation /\*\[.\{-}\]/ contained containedin=pandocAbbreviationDefinition
135+
syn match pandocAbbreviationHead /\*\[/ contained containedin=pandocAbbreviation conceal
136+
syn match pandocAbbreviationTail /\]/ contained containedin=pandocAbbreviation conceal
137+
" }}}
138+
131139
" Footnotes: {{{1
132140
" we put these here not to interfere with superscripts.
133141
"
@@ -202,6 +210,12 @@ hi link pandocAutomaticLink Underlined
202210
hi link pandocDefinitionBlockTerm Identifier
203211
hi link pandocDefinitionBlockMark Operator
204212

213+
hi link pandocAbbreviationHead Type
214+
hi link pandocAbbreviation Label
215+
hi link pandocAbbreviationTail Type
216+
hi link pandocAbbreviationSeparator Identifier
217+
hi link pandocAbbreviationDefinition Comment
218+
205219
hi link pandocFootnoteID Label
206220
hi link pandocFootnoteIDHead Type
207221
hi link pandocFootnoteIDTail Type

0 commit comments

Comments
 (0)