1
- scriptencoding utf- 8
2
- " vim: set fdm = marker foldlevel = 0 :
3
- "
4
1
" Vim syntax file
5
2
"
6
3
" Language: Pandoc (superset of Markdown)
@@ -9,692 +6,17 @@ scriptencoding utf-8
9
6
" Contributor: David Sanson <dsanson@gmail.com>
10
7
" Contributor: Jorge Israel Peña <jorge.israel.p@gmail.com>
11
8
" OriginalAuthor: Jeremy Schultz <taozhyn@gmail.com>
12
- " Version: 5.0
13
-
14
- " Configuration: {{{1
15
- "
16
- " use conceal? {{{2
17
- if ! exists (' g:pandoc#syntax#conceal#use' )
18
- if v: version < 703
19
- let g: pandoc #syntax #conceal#use = 0
20
- else
21
- let g: pandoc #syntax #conceal#use = 1
22
- endif
23
- else
24
- " exists, but we cannot use it, disable anyway
25
- if v: version < 703
26
- let g: pandoc #syntax #conceal#use = 0
27
- endif
28
- endif
29
- " }}}2
30
-
31
- " what groups not to use conceal in. works as a blacklist {{{2
32
- if ! exists (' g:pandoc#syntax#conceal#blacklist' )
33
- let g: pandoc #syntax #conceal#blacklist = []
34
- endif
35
- " }}}2
36
-
37
- " cchars used in conceal rules {{{2
38
- " utf-8 defaults (preferred)
39
- if &encoding == # ' utf-8'
40
- let s: cchars = {
41
- \' newline' : ' ↵',
42
- \' image' : ' ▨',
43
- \' super' : ' ⁿ',
44
- \' sub' : ' ₙ',
45
- \' strike' : ' x ̶',
46
- \' atx' : ' §',
47
- \' codelang' : ' λ',
48
- \' codeend' : ' —',
49
- \' abbrev' : ' →',
50
- \' footnote' : ' †',
51
- \' definition' : ' ',
52
- \' li ' : ' •',
53
- \' html_c_s' : ' ‹',
54
- \' html_c_e' : ' ›'}
55
- else
56
- " ascii defaults
57
- let s: cchars = {
58
- \' newline' : ' ',
59
- \' image' : ' i ',
60
- \' super' : ' ^',
61
- \' sub' : ' _',
62
- \' strike' : ' ~',
63
- \' atx' : ' #',
64
- \' codelang' : ' l ',
65
- \' codeend' : ' - ',
66
- \' abbrev' : ' a ',
67
- \' footnote' : ' f ',
68
- \' definition' : ' ',
69
- \' li ' : ' * ',
70
- \' html_c_s' : ' + ',
71
- \' html_c_e' : ' + '}
72
- endif
73
- " }}}2
74
-
75
- " if the user has a dictionary with replacements for the default cchars, use those {{{2
76
- if exists (' g:pandoc#syntax#conceal#cchar_overrides' )
77
- let s: cchars = extend (s: cchars , g: pandoc #syntax #conceal#cchar_overrides)
78
- endif
79
- " }}}2
80
-
81
- " should the urls in links be concealed? {{{2
82
- if ! exists (' g:pandoc#syntax#conceal#urls' )
83
- let g: pandoc #syntax #conceal#urls = 0
84
- endif
85
- " should backslashes in escapes be concealed? {{{2
86
- if ! exists (' g:pandoc#syntax#conceal#backslash' )
87
- let g: pandoc #syntax #conceal#backslash = 0
88
- endif
89
- " }}}2
90
-
91
- " leave specified codeblocks as Normal (i.e. 'unhighlighted') {{{2
92
- if ! exists (' g:pandoc#syntax#codeblocks#ignore' )
93
- let g: pandoc #syntax #codeblocks#ignore = []
94
- endif
95
- " }}}2
96
-
97
- " use embedded highlighting for delimited codeblocks where a language is specifed. {{{2
98
- if ! exists (' g:pandoc#syntax#codeblocks#embeds#use' )
99
- let g: pandoc #syntax #codeblocks#embeds#use = 1
100
- endif
101
- " }}}2
102
-
103
- " for what languages and using what vim syntax files highlight those embeds. {{{2
104
- " defaults to None.
105
- if ! exists (' g:pandoc#syntax#codeblocks#embeds#langs' )
106
- let g: pandoc #syntax #codeblocks#embeds#langs = []
107
- endif
108
- " }}}2
109
-
110
- " use italics ? {{{2
111
- if ! exists (' g:pandoc#syntax#style#emphases' )
112
- let g: pandoc #syntax #style#emphases = 1
113
- endif
114
- " if 0, we don't conceal the emphasis marks, otherwise there wouldn't be a way
115
- " to tell where the styles apply.
116
- if g: pandoc #syntax #style#emphases == 0
117
- call add (g: pandoc #syntax #conceal#blacklist, ' block' )
118
- endif
119
- " }}}2
120
-
121
- " underline subscript, superscript and strikeout? {{{2
122
- if ! exists (' g:pandoc#syntax#style#underline_special' )
123
- let g: pandoc #syntax #style#underline_special = 1
124
- endif
125
- " }}}2
126
-
127
- " protect code blocks? {{{2
128
- if ! exists (' g:pandoc#syntax#protect#codeblocks' )
129
- let g: pandoc #syntax #protect#codeblocks = 1
130
- endif
131
- " }}}2
132
-
133
- " use color column? {{{2
134
- if ! exists (' g:pandoc#syntax#colorcolumn' )
135
- let g: pandoc #syntax #colorcolumn = 0
136
- endif
137
- " }}}2
138
-
139
- " highlight new lines? {{{2
140
- if ! exists (' g:pandoc#syntax#newlines' )
141
- let g: pandoc #syntax #newlines = 1
142
- endif
143
- " }}}
144
-
145
- " detect roman-numeral list items? {{{2
146
- if ! exists (' g:pandoc#syntax#roman_lists' )
147
- let g: pandoc #syntax #roman_lists = 0
148
- endif
149
- " }}}2
150
9
151
- " disable syntax highlighting for definition lists? (better performances) {{{2
152
- if ! exists (' g:pandoc#syntax#use_definition_lists' )
153
- let g: pandoc #syntax #use_definition_lists = 1
154
- endif
155
- " }}}2
156
-
157
- " }}}1
158
-
159
- " Functions: {{{1
160
- " EnableEmbedsforCodeblocksWithLang {{{2
161
- function ! EnableEmbedsforCodeblocksWithLang (entry)
162
- " prevent embedded language syntaxes from changing 'foldmethod'
163
- if has (' folding' )
164
- let s: foldmethod = &l: foldmethod
165
- endif
166
-
167
- try
168
- let s: langname = matchstr (a: entry , ' ^[^=]*' )
169
- let s: langsyntaxfile = matchstr (a: entry , ' [^=]*$' )
170
- unlet ! b: current_syntax
171
- exe ' syn include @' .toupper (s: langname ).' syntax/' .s: langsyntaxfile .' .vim'
172
- exe ' syn region pandocDelimitedCodeBlock_' . s: langname . ' start=/\(\_^\([ ]\{4,}\|\t\)\=\(`\{3,}`*\|\~\{3,}\~*\)\s*\%({[^.]*\.\)\=' . s: langname . ' \>.*\n\)\@<=\_^/' .
173
- \' end = /\_$\n\(\([ ]\{4,}\|\t\)\=\(`\{3,}`*\|\~\{3,}\~*\)\_$\n\_$\)\@=/ contained containedin= pandocDelimitedCodeBlock' .
174
- \' contains= @ ' . toupper (s: langname )
175
- exe ' syn region pandocDelimitedCodeBlockinBlockQuote_' . s: langname . ' start=/>\s\(`\{3,}`*\|\~\{3,}\~*\)\s*\%({[^.]*\.\)\=' . s: langname . ' \>/' .
176
- \ ' end=/\(`\{3,}`*\|\~\{3,}\~*\)/ contained containedin=pandocDelimitedCodeBlock' .
177
- \' contains= @ ' . toupper (s: langname ) .
178
- \' ,pandocDelimitedCodeBlockStart,pandocDelimitedCodeBlockEnd,pandodDelimitedCodeblockLang,pandocBlockQuoteinDelimitedCodeBlock'
179
- catch /E484/
180
- echo " No syntax file found for '" . s: langsyntaxfile . " '"
181
- endtry
182
-
183
- if exists (' s:foldmethod' ) && s: foldmethod !=# &l: foldmethod
184
- let &l: foldmethod = s: foldmethod
185
- endif
186
- endfunction
187
- " }}}2
188
-
189
- " DisableEmbedsforCodeblocksWithLang {{{2
190
- function ! DisableEmbedsforCodeblocksWithLang (langname)
191
- try
192
- exe ' syn clear pandocDelimitedCodeBlock_' .a: langname
193
- exe ' syn clear pandocDelimitedCodeBlockinBlockQuote_' .a: langname
194
- catch /E28/
195
- echo " No existing highlight definitions found for '" . a: langname . " '"
196
- endtry
197
- endfunction
198
- " }}}2
199
-
200
- " WithConceal {{{2
201
- function ! s: WithConceal (rule_group, rule, conceal_rule)
202
- let l: rule_tail = ' '
203
- if g: pandoc #syntax #conceal#use != 0
204
- if index (g: pandoc #syntax #conceal#blacklist, a: rule_group ) == -1
205
- let l: rule_tail = ' ' . a: conceal_rule
206
- endif
207
- endif
208
- execute a: rule . l: rule_tail
209
- endfunction
210
- " }}}2
211
-
212
- " }}}1
213
-
214
- " Commands: {{{1
215
- command ! - buffer -nargs =1 -complete =syntax PandocHighlight call EnableEmbedsforCodeblocksWithLang (<f-args> )
216
- command ! - buffer -nargs =1 -complete =syntax PandocUnhighlight call DisableEmbedsforCodeblocksWithLang (<f-args> )
217
- " }}}1
218
-
219
- " BASE:
220
- syntax clear
221
- syntax spell toplevel
222
- " apply extra settings: {{{1
223
- if g: pandoc #syntax #colorcolumn == 1
224
- exe ' setlocal colorcolumn=' .string (&textwidth + 5 )
225
- elseif g: pandoc #syntax #colorcolumn == 2
226
- exe ' setlocal colorcolumn=' .join (range (&textwidth + 5 , 2 * &columns ), ' ,' )
227
- endif
228
- if g: pandoc #syntax #conceal#use != 0
229
- setlocal conceallevel= 2
230
- endif
231
- " }}}1
232
-
233
- " Syntax Rules: {{{1
234
-
235
- " Embeds: {{{2
236
-
237
- " prevent embedded language syntaxes from changing 'foldmethod'
238
- if has (' folding' )
239
- let s: foldmethod = &l: foldmethod
240
- endif
241
-
242
- " HTML: {{{3
243
- " Set embedded HTML highlighting
244
- syn include @HTML syntax/html.vim
245
- syn match pandocHTML / <\/\?\a .\{ -}>/ contains =@HTML
246
- " Support HTML multi line comments
247
- syn region pandocHTMLComment start =/ <!--\s\= / end =/ \s\= -->/ keepend contains =pandocHTMLCommentStart,pandocHTMLCommentEnd
248
- call s: WithConceal (' html_c_s' , ' syn match pandocHTMLCommentStart /<!--/ contained' , ' conceal cchar=' .s: cchars [' html_c_s' ])
249
- call s: WithConceal (' html_c_e' , ' syn match pandocHTMLCommentEnd /-->/ contained' , ' conceal cchar=' .s: cchars [' html_c_e' ])
250
- " }}}3
251
-
252
- " LaTeX: {{{3
253
- " Set embedded LaTex (pandoc extension) highlighting
254
- " Unset current_syntax so the 2nd include will work
255
- unlet b: current_syntax
256
- syn include @LATEX syntax/tex.vim
257
- syn region pandocLaTeXInlineMath start =/ \v\\ @<!\$\S @=/ end =/ \v\\ @<!\$\d @!/ keepend contains =@LATEX
258
- syn region pandocLaTeXInlineMath start =/ \\\@ <!\\ (/ end =/ \\\@ <!\\ )/ keepend contains =@LATEX
259
- syn match pandocEscapedDollar / \\\$ / conceal cchar =$
260
- syn match pandocProtectedFromInlineLaTeX / \\\@ <!\$ {.*}\(\(\s\| [[:punct:]]\)\( [^$]*\| .*\(\\\$ .*\)\{ 2}\)\n\n\| $\)\@ =/ display
261
- " contains=@LATEX
262
- syn region pandocLaTeXMathBlock start =/ \$\$ / end =/ \$\$ / keepend contains =@LATEX
263
- syn region pandocLaTeXMathBlock start =/ \\\@ <!\\\[ / end =/ \\\@ <!\\\] / keepend contains =@LATEX
264
- syn match pandocLaTeXCommand / \\ [[:alpha:]]\+\(\( {.\{ -}}\)\=\(\[ .\{ -}\]\)\=\) */ contains =@LATEX
265
- syn region pandocLaTeXRegion start =/ \\ begin{\z (.\{ -}\) }/ end =/ \\ end{\z 1}/ keepend contains =@LATEX
266
- " we rehighlight sectioning commands, because otherwise tex.vim captures all text until EOF or a new sectioning command
267
- syn region pandocLaTexSection start =/ \\\( part\| chapter\|\( sub\)\{ ,2}section\|\( sub\)\= paragraph\)\*\=\(\[ .*\]\)\= {/ end =/ \} / keepend
268
- syn match pandocLaTexSectionCmd / \\\( part\| chapter\|\( sub\)\{ ,2}section\|\( sub\)\= paragraph\) / contained containedin =pandocLaTexSection
269
- syn match pandocLaTeXDelimiter / [[\] {}]/ contained containedin=pandocLaTexSection
270
- " }}}3
271
-
272
- if exists (' s:foldmethod' ) && s: foldmethod !=# &l: foldmethod
273
- let &l: foldmethod = s: foldmethod
274
- endif
275
-
276
- " }}}2
277
-
278
- " Titleblock: {{{2
279
- syn region pandocTitleBlock start =/ \% ^%/ end =/ \n\n / contains =pandocReferenceLabel,pandocReferenceURL,pandocNewLine
280
- call s: WithConceal (' titleblock' , ' syn match pandocTitleBlockMark /%\ / contained containedin=pandocTitleBlock,pandocTitleBlockTitle' , ' conceal' )
281
- syn match pandocTitleBlockTitle / \% ^%.*\n / contained containedin =pandocTitleBlock
282
- " }}}2
283
-
284
- " Blockquotes: {{{2
285
- syn match pandocBlockQuote / ^\s\{ ,3}>.*\n\( .*\n\@ 1<!\n\) */ contains =@Spell,pandocEmphasis,pandocStrong,pandocPCite,pandocSuperscript,pandocSubscript,pandocStrikeout,pandocUListItem,pandocNoFormatted,pandocAmpersandEscape,pandocLaTeXInlineMath,pandocEscapedDollar,pandocLaTeXCommand,pandocLaTeXMathBlock,pandocLaTeXRegion skipnl
286
- syn match pandocBlockQuoteMark / \_ ^\s\{ ,3}>/ contained containedin =pandocEmphasis,pandocStrong,pandocPCite,pandocSuperscript,pandocSubscript,pandocStrikeout,pandocUListItem,pandocNoFormatted
287
- " }}}2
10
+ scriptencoding utf- 8
288
11
289
- " Code Blocks: {{{2
290
- if g: pandoc #syntax #protect#codeblocks == 1
291
- syn match pandocCodeblock / \( [ ]\{ 4}\|\t\) .*$/
12
+ if exists (' b:current_syntax' )
13
+ finish
292
14
endif
293
- syn region pandocCodeBlockInsideIndent start =/ \(\(\d\|\a\| *\) .*\n\)\@ <!\( ^\(\s\{ 8,}\|\t\+\)\) .*\n / end =/ .\(\n ^\s *\n\)\@ =/ contained
294
- " }}}2
295
-
296
- " Links: {{{2
297
15
298
- " Base: {{{3
299
- syn region pandocReferenceLabel matchgroup =pandocOperator start =/ !\{ ,1}\\\@ <!\^\@ <!\[ / skip =/ \(\\\@ <!\]\]\@ =\| `.*\\\@ <!].*`\) / end =/ \\\@ <!\] / keepend display
300
- if g: pandoc #syntax #conceal#urls == 1
301
- syn region pandocReferenceURL matchgroup =pandocOperator start =/ \]\@ 1<=(/ end =/ )/ keepend conceal
16
+ if exists (' g:pandoc#syntax#flavor#commonmark' ) || exists (' b:pandoc#syntax#flavor#commonmark' )
17
+ runtime syntax /pandoc_commonmark.vim
302
18
else
303
- syn region pandocReferenceURL matchgroup = pandocOperator start = / \]\@ 1<=( / end = / ) / keepend
19
+ runtime syntax /pandoc_legacy. vim
304
20
endif
305
- " let's not consider "a [label] a" as a label, remove formatting - Note: breaks implicit links
306
- syn match pandocNoLabel / \]\@ 1<!\(\s\{ ,3}\| ^\)\[ [^\[\] ]\{ -}\]\(\s\+\| $\) [\[ (]\@ !/ contains =pandocPCite
307
- syn match pandocLinkTip / \s *".\{ -}"/ contained containedin =pandocReferenceURL contains =@Spell,pandocAmpersandEscape display
308
- call s: WithConceal (' image' , ' syn match pandocImageIcon /!\[\@=/ display' , ' conceal cchar=' . s: cchars [' image' ])
309
- " }}}3
310
-
311
- " Definitions: {{{3
312
- syn region pandocReferenceDefinition start =" !\=\[\% (\_ [^]]*]\% ( \= [[(]\)\)\@ =" end="\]\% ( \= [[(]\)\@ =" keepend
313
- syn match pandocReferenceDefinitionLabel / \[\z s.\{ -}\z e\] :/ contained containedin =pandocReferenceDefinition display
314
- syn match pandocReferenceDefinitionAddress / :\s *\z s.*/ contained containedin =pandocReferenceDefinition
315
- syn match pandocReferenceDefinitionTip / \s *".\{ -}"/ contained containedin =pandocReferenceDefinition,pandocReferenceDefinitionAddress contains =@Spell,pandocAmpersandEscape
316
- " }}}3
317
-
318
- " Automatic_links: {{{3
319
- syn match pandocAutomaticLink / <\( https\{ 0,1}.\{ -}\| [A-Za-z0-9!#$%&'*+\- /=?^_`{|}~.]\{ -}@[A-Za-z0-9\- ]\{ -}\.\w\{ -}\) >/ contains =NONE
320
- " }}}3
321
-
322
- " }}}2
323
-
324
- " Citations: {{{2
325
- " parenthetical citations
326
- syn match pandocPCite " \^\@ <!\[ [^\[\] ]\{ -}-\{ 0,1}@[[:alnum:]_][[:digit:][:lower:][:upper:]_:.#$%&\- +?<>~/]*.\{ -}\] " contains =pandocEmphasis,pandocStrong,pandocLatex,pandocCiteKey,@Spell,pandocAmpersandEscape display
327
- " in-text citations with location
328
- syn match pandocICite " @[[:alnum:]_][[:digit:][:lower:][:upper:]_:.#$%&\- +?<>~/]*\s\[ .\{ -1,}\] " contains =pandocCiteKey,@Spell display
329
- " cite keys
330
- syn match pandocCiteKey / \( -\= @[[:alnum:]_][[:digit:][:lower:][:upper:]_:.#$%&\- +?<>~/]*\) / containedin =pandocPCite,pandocICite contains =@NoSpell display
331
- syn match pandocCiteAnchor / [-@]/ contained containedin =pandocCiteKey display
332
- syn match pandocCiteLocator / [\[\] ]/ contained containedin =pandocPCite,pandocICite
333
- " }}}2
334
-
335
- " Text Styles: {{{2
336
-
337
- " Emphasis: {{{3
338
- call s: WithConceal (' block' , ' syn region pandocEmphasis matchgroup=pandocOperator start=/\\\@1<!\(\_^\|\s\|[[:punct:]]\)\@<=\*\S\@=/ skip=/\(\*\*\|__\)/ end=/\*\([[:punct:]]\|\s\|\_$\)\@=/ contains=@Spell,pandocNoFormattedInEmphasis,pandocLatexInlineMath,pandocAmpersandEscape' , ' concealends' )
339
- call s: WithConceal (' block' , ' syn region pandocEmphasis matchgroup=pandocOperator start=/\\\@1<!\(\_^\|\s\|[[:punct:]]\)\@<=_\S\@=/ skip=/\(\*\*\|__\)/ end=/\S\@1<=_\([[:punct:]]\|\s\|\_$\)\@=/ contains=@Spell,pandocNoFormattedInEmphasis,pandocLatexInlineMath,pandocAmpersandEscape' , ' concealends' )
340
- " }}}3
341
-
342
- " Strong: {{{3
343
- call s: WithConceal (' block' , ' syn region pandocStrong matchgroup=pandocOperator start=/\(\\\@<!\*\)\{2}/ end=/\(\\\@<!\*\)\{2}/ contains=@Spell,pandocNoFormattedInStrong,pandocLatexInlineMath,pandocAmpersandEscape' , ' concealends' )
344
- call s: WithConceal (' block' , ' syn region pandocStrong matchgroup=pandocOperator start=/__/ end=/__/ contains=@Spell,pandocNoFormattedInStrong,pandocLatexInlineMath,pandocAmpersandEscape' , ' concealends' )
345
- " }}}3
346
-
347
- " Strong Emphasis: {{{3
348
- call s: WithConceal (' block' , ' syn region pandocStrongEmphasis matchgroup=pandocOperator start=/\*\{3}\(\S[^*]*\(\*\S\|\n[^*]*\*\S\)\)\@=/ end=/\S\@<=\*\{3}/ contains=@Spell,pandocAmpersandEscape' , ' concealends' )
349
- call s: WithConceal (' block' , ' syn region pandocStrongEmphasis matchgroup=pandocOperator start=/\(___\)\S\@=/ end=/\S\@<=___/ contains=@Spell,pandocAmpersandEscape' , ' concealends' )
350
- " }}}3
351
-
352
- " Mixed: {{{3
353
- call s: WithConceal (' block' , ' syn region pandocStrongInEmphasis matchgroup=pandocOperator start=/\*\*/ end=/\*\*/ contained containedin=pandocEmphasis contains=@Spell,pandocAmpersandEscape' , ' concealends' )
354
- call s: WithConceal (' block' , ' syn region pandocStrongInEmphasis matchgroup=pandocOperator start=/__/ end=/__/ contained containedin=pandocEmphasis contains=@Spell,pandocAmpersandEscape' , ' concealends' )
355
- call s: WithConceal (' block' , ' syn region pandocEmphasisInStrong matchgroup=pandocOperator start=/\\\@1<!\(\_^\|\s\|[[:punct:]]\)\@<=\*\S\@=/ skip=/\(\*\*\|__\)/ end=/\S\@<=\*\([[:punct:]]\|\s\|\_$\)\@=/ contained containedin=pandocStrong contains=@Spell,pandocAmpersandEscape' , ' concealends' )
356
- call s: WithConceal (' block' , ' syn region pandocEmphasisInStrong matchgroup=pandocOperator start=/\\\@<!\(\_^\|\s\|[[:punct:]]\)\@<=_\S\@=/ skip=/\(\*\*\|__\)/ end=/\S\@<=_\([[:punct:]]\|\s\|\_$\)\@=/ contained containedin=pandocStrong contains=@Spell,pandocAmpersandEscape' , ' concealends' )
357
- " }}}3
358
-
359
- " Inline Code: {{{3
360
- " Using single back ticks
361
- call s: WithConceal (' inlinecode' , ' syn region pandocNoFormatted matchgroup=pandocOperator start=/\\\@<!`/ end=/\\\@<!`/ nextgroup=pandocNoFormattedAttrs' , ' concealends' )
362
- call s: WithConceal (' inlinecode' , ' syn region pandocNoFormattedInEmphasis matchgroup=pandocOperator start=/\\\@<!`/ end=/\\\@<!`/ nextgroup=pandocNoFormattedAttrs contained' , ' concealends' )
363
- call s: WithConceal (' inlinecode' , ' syn region pandocNoFormattedInStrong matchgroup=pandocOperator start=/\\\@<!`/ end=/\\\@<!`/ nextgroup=pandocNoFormattedAttrs contained' , ' concealends' )
364
- " Using double back ticks
365
- call s: WithConceal (' inlinecode' , ' syn region pandocNoFormatted matchgroup=pandocOperator start=/\\\@<!``/ end=/\\\@<!``/ nextgroup=pandocNoFormattedAttrs' , ' concealends' )
366
- call s: WithConceal (' inlinecode' , ' syn region pandocNoFormattedInEmphasis matchgroup=pandocOperator start=/\\\@<!``/ end=/\\\@<!``/ nextgroup=pandocNoFormattedAttrs contained' , ' concealends' )
367
- call s: WithConceal (' inlinecode' , ' syn region pandocNoFormattedInStrong matchgroup=pandocOperator start=/\\\@<!``/ end=/\\\@<!``/ nextgroup=pandocNoFormattedAttrs contained' , ' concealends' )
368
- syn match pandocNoFormattedAttrs / {.\{ -}}/ contained
369
- " }}}3
370
-
371
- " Subscripts: {{{3
372
- syn region pandocSubscript start =/ \~\(\( [[:graph:]]\(\\ \)\=\)\{ -}\~\)\@ =/ end =/ \~ / keepend
373
- call s: WithConceal (' subscript' , ' syn match pandocSubscriptMark /\~/ contained containedin=pandocSubscript' , ' conceal cchar=' .s: cchars [' sub' ])
374
- " }}}3
375
-
376
- " Superscript: {{{3
377
- syn region pandocSuperscript start =/ \^\(\( [[:graph:]]\(\\ \)\=\)\{ -}\^\)\@ =/ skip =/ \\ / end =/ \^ / keepend
378
- call s: WithConceal (' superscript' , ' syn match pandocSuperscriptMark /\^/ contained containedin=pandocSuperscript' , ' conceal cchar=' .s: cchars [' super' ])
379
- " }}}3
380
-
381
- " Strikeout: {{{3
382
- syn region pandocStrikeout start =/ \~\~ / end =/ \~\~ / contains =@Spell,pandocAmpersandEscape keepend
383
- call s: WithConceal (' strikeout' , ' syn match pandocStrikeoutMark /\~\~/ contained containedin=pandocStrikeout' , ' conceal cchar=' .s: cchars [' strike' ])
384
- " }}}3
385
-
386
- " }}}2
387
-
388
- " Headers: {{{2
389
- syn match pandocAtxHeader / \(\% ^\| <.\+ >.*\n\| ^\s *\n\)\@ <=#\{ 1,6}.*\n / contains =pandocEmphasis,pandocStrong,pandocNoFormatted,pandocLaTeXInlineMath,pandocEscapedDollar,@Spell,pandocAmpersandEscape,pandocReferenceLabel,pandocReferenceURL display
390
- syn match pandocAtxHeaderMark / \( ^#\{ 1,6}\|\\\@ <!#\+\(\s *.*$\)\@ =\) / contained containedin =pandocAtxHeader
391
- call s: WithConceal (' atx' , ' syn match pandocAtxStart /#/ contained containedin=pandocAtxHeaderMark' , ' conceal cchar=' .s: cchars [' atx' ])
392
- syn match pandocSetexHeader / ^.\+\n [=]\+ $/ contains =pandocEmphasis,pandocStrong,pandocNoFormatted,pandocLaTeXInlineMath,pandocEscapedDollar,@Spell,pandocAmpersandEscape
393
- syn match pandocSetexHeader / ^.\+\n [-]\+ $/ contains =pandocEmphasis,pandocStrong,pandocNoFormatted,pandocLaTeXInlineMath,pandocEscapedDollar,@Spell,pandocAmpersandEscape
394
- syn match pandocHeaderAttr / {.*}/ contained containedin =pandocAtxHeader,pandocSetexHeader
395
- syn match pandocHeaderID / #[-_:.[:lower:][:upper:]]*/ contained containedin =pandocHeaderAttr
396
- " }}}2
397
-
398
- " Line Blocks: {{{2
399
- syn region pandocLineBlock start =/ ^|/ end =/ \( ^|\( .*\n |\@ !\)\@ =.*\)\@ <=\n / transparent
400
- syn match pandocLineBlockDelimiter / ^|/ contained containedin =pandocLineBlock
401
- " }}}2
402
-
403
- " Tables: {{{2
404
-
405
- " Simple: {{{3
406
- syn region pandocSimpleTable start =/ \% #=2\( ^.*[[:graph:]].*\n\)\@ <!\( ^.*[[:graph:]].*\n\)\( -\{ 2,}\s *\)\+\n\n\@ !/ end =/ \n\n / containedin =ALLBUT,pandocDelimitedCodeBlock,pandocYAMLHeader keepend
407
- syn match pandocSimpleTableDelims / \- / contained containedin =pandocSimpleTable
408
- syn match pandocSimpleTableHeader / \% #=2\( ^.*[[:graph:]].*\n\)\@ <!\( ^.*[[:graph:]].*\n\) / contained containedin =pandocSimpleTable
409
-
410
- syn region pandocTable start =/ \% #=2^\( -\{ 2,}\s *\)\+\n\n\@ !/ end =/ \% #=2^\( -\{ 2,}\s *\)\+\n\n / containedin =ALLBUT,pandocDelimitedCodeBlock,pandocYAMLHeader keepend
411
- syn match pandocTableDelims / \- / contained containedin =pandocTable
412
- syn region pandocTableMultilineHeader start =/ \% #=2\( ^-\{ 2,}\n\)\@ <=./ end =/ \% #=2\n -\@ =/ contained containedin =pandocTable
413
- " }}}3
414
-
415
- " Grid: {{{3
416
- syn region pandocGridTable start =/ \% #=2\n\@ 1<=+-/ end =/ +\n\n / containedin =ALLBUT,pandocDelimitedCodeBlock,pandocYAMLHeader keepend
417
- syn match pandocGridTableDelims / [\| =]/ contained containedin =pandocGridTable
418
- syn match pandocGridTableDelims / \% #=2\( [\- +][\- +=]\@ =\| [\- +=]\@ 1<=[\- +]\) / contained containedin =pandocGridTable
419
- syn match pandocGridTableHeader / \% #=2\( ^.*\n\)\( +=.*\)\@ =/ contained containedin =pandocGridTable
420
- " }}}3
421
-
422
- " Pipe: {{{3
423
- " with beginning and end pipes
424
- syn region pandocPipeTable start =/ \% #=2\( [+|]\n\)\@ <!\n\@ 1<=|\( .*|\)\@ =/ end =/ |.*\n\(\n\| {\) / containedin =ALLBUT,pandocDelimitedCodeBlock,pandocYAMLHeader keepend
425
- " without beginning and end pipes
426
- syn region pandocPipeTable start =/ \% #=2^.*\n -.\{ -}|/ end =/ |.*\n\n / keepend
427
- syn match pandocPipeTableDelims / [\|\- :+]/ contained containedin =pandocPipeTable
428
- syn match pandocPipeTableHeader / \( ^.*\n\)\( |-\)\@ =/ contained containedin =pandocPipeTable
429
- syn match pandocPipeTableHeader / \( ^.*\n\)\( -\)\@ =/ contained containedin =pandocPipeTable
430
- " }}}3
431
-
432
- syn match pandocTableHeaderWord / \< .\{ -}\> / contained containedin =pandocGridTableHeader,pandocPipeTableHeader contains =@Spell
433
- " }}}2
434
-
435
- " Delimited Code Blocks: {{{2
436
- " this is here because we can override strikeouts and subscripts
437
- syn region pandocDelimitedCodeBlock start =/ ^\( >\s\)\?\z (\( [ ]\{ 4,}\|\t\)\=\~\{ 3,}\~ *\) / end =/ ^\z 1\~ */ skipnl contains =pandocDelimitedCodeBlockStart,pandocDelimitedCodeBlockEnd keepend
438
- syn region pandocDelimitedCodeBlock start =/ ^\( >\s\)\?\z (\( [ ]\{ 4,}\|\t\)\= `\{ 3,}`*\) / end =/ ^\z 1`*/ skipnl contains =pandocDelimitedCodeBlockStart,pandocDelimitedCodeBlockEnd keepend
439
- call s: WithConceal (' codeblock_start' , ' syn match pandocDelimitedCodeBlockStart /\(\_^\n\_^\(>\s\)\?\([ ]\{4,}\|\t\)\=\)\@<=\(\~\{3,}\~*\|`\{3,}`*\)/ contained containedin=pandocDelimitedCodeBlock nextgroup=pandocDelimitedCodeBlockLanguage' , ' conceal cchar=' .s: cchars [' codelang' ])
440
- syn match pandocDelimitedCodeBlockLanguage / \(\s\?\)\@ <=.\+\(\_ $\)\@ =/ contained
441
- call s: WithConceal (' codeblock_delim' , ' syn match pandocDelimitedCodeBlockEnd /\(`\{3,}`*\|\~\{3,}\~*\)\(\_$\n\(>\s\)\?\_$\)\@=/ contained containedin=pandocDelimitedCodeBlock' , ' conceal cchar=' .s: cchars [' codeend' ])
442
- syn match pandocBlockQuoteinDelimitedCodeBlock ' ^>' contained containedin =pandocDelimitedCodeBlock
443
- syn match pandocCodePre / <pre>.\{ -}<\/ pre>/ skipnl
444
- syn match pandocCodePre / <code>.\{ -}<\/ code>/ skipnl
445
-
446
- " enable highlighting for embedded region in codeblocks if there exists a
447
- " g:pandoc#syntax#codeblocks#embeds#langs *list*.
448
- "
449
- " entries in this list are the language code interpreted by pandoc,
450
- " if this differs from the name of the vim syntax file, append =vimname
451
- " e.g. let g:pandoc#syntax#codeblocks#embeds#langs = ["haskell", "literatehaskell=lhaskell"]
452
- "
453
- if g: pandoc #syntax #codeblocks#embeds#use != 0
454
- for l in g: pandoc #syntax #codeblocks#embeds#langs
455
- call EnableEmbedsforCodeblocksWithLang (l )
456
- endfor
457
- endif
458
- " }}}2
459
-
460
- " Abbreviations: {{{2
461
- syn region pandocAbbreviationDefinition start =/ ^\*\[ .\{ -}\] :\s */ end =' $' contains =pandocNoFormatted,@Spell,pandocAmpersandEscape
462
- call s: WithConceal (' abbrev' , ' syn match pandocAbbreviationSeparator /:/ contained containedin=pandocAbbreviationDefinition' , ' conceal cchar=' .s: cchars [' abbrev' ])
463
- syn match pandocAbbreviation / \*\[ .\{ -}\] / contained containedin =pandocAbbreviationDefinition
464
- call s: WithConceal (' abbrev' , ' syn match pandocAbbreviationHead /\*\[/ contained containedin=pandocAbbreviation' , ' conceal' )
465
- call s: WithConceal (' abbrev' , ' syn match pandocAbbreviationTail /\]/ contained containedin=pandocAbbreviation' , ' conceal' )
466
- " }}}2
467
-
468
- " Footnotes: {{{2
469
- " we put these here not to interfere with superscripts.
470
- syn match pandocFootnoteID / \[\^ [^\] ]\+\] / nextgroup =pandocFootnoteDef
471
-
472
- " Inline footnotes
473
- syn region pandocFootnoteDef start =/ \^\[ / skip =/ \[ .\{ -}]/ end =/ \] / contains =pandocReferenceLabel,pandocReferenceURL,pandocLatex,pandocPCite,pandocCiteKey,pandocStrong,pandocEmphasis,pandocStrongEmphasis,pandocNoFormatted,pandocSuperscript,pandocSubscript,pandocStrikeout,pandocEnDash,pandocEmDash,pandocEllipses,pandocBeginQuote,pandocEndQuote,@Spell,pandocAmpersandEscape skipnl keepend
474
- call s: WithConceal (' footnote' , ' syn match pandocFootnoteDefHead /\^\[/ contained containedin=pandocFootnoteDef' , ' conceal cchar=' .s: cchars [' footnote' ])
475
- call s: WithConceal (' footnote' , ' syn match pandocFootnoteDefTail /\]/ contained containedin=pandocFootnoteDef' , ' conceal' )
476
-
477
- " regular footnotes
478
- syn region pandocFootnoteBlock start =/ \[\^ .\{ -}\] :\s *\n */ end =/ ^\n ^\s\@ !/ contains =pandocReferenceLabel,pandocReferenceURL,pandocLatex,pandocPCite,pandocCiteKey,pandocStrong,pandocEmphasis,pandocNoFormatted,pandocSuperscript,pandocSubscript,pandocStrikeout,pandocEnDash,pandocEmDash,pandocNewLine,pandocStrongEmphasis,pandocEllipses,pandocBeginQuote,pandocEndQuote,pandocLaTeXInlineMath,pandocEscapedDollar,pandocLaTeXCommand,pandocLaTeXMathBlock,pandocLaTeXRegion,pandocAmpersandEscape,@Spell skipnl
479
- syn match pandocFootnoteBlockSeparator / :/ contained containedin =pandocFootnoteBlock
480
- syn match pandocFootnoteID / \[\^ .\{ -}\] / contained containedin =pandocFootnoteBlock
481
- call s: WithConceal (' footnote' , ' syn match pandocFootnoteIDHead /\[\^/ contained containedin=pandocFootnoteID' , ' conceal cchar=' .s: cchars [' footnote' ])
482
- call s: WithConceal (' footnote' , ' syn match pandocFootnoteIDTail /\]/ contained containedin=pandocFootnoteID' , ' conceal' )
483
- " }}}2
484
-
485
- " List Items: {{{2
486
- " Unordered lists
487
- syn match pandocUListItem / ^>\=\s *[*+-]\s\+ -\@ !.*$/ nextgroup =pandocUListItem,pandocLaTeXMathBlock,pandocLaTeXInlineMath,pandocEscapedDollar,pandocDelimitedCodeBlock,pandocListItemContinuation contains =@Spell,pandocEmphasis,pandocStrong,pandocNoFormatted,pandocStrikeout,pandocSubscript,pandocSuperscript,pandocStrongEmphasis,pandocStrongEmphasis,pandocPCite,pandocICite,pandocCiteKey,pandocReferenceLabel,pandocLaTeXCommand,pandocLaTeXMathBlock,pandocLaTeXInlineMath,pandocEscapedDollar,pandocReferenceURL,pandocAutomaticLink,pandocFootnoteDef,pandocFootnoteBlock,pandocFootnoteID,pandocAmpersandEscape skipempty display
488
- call s: WithConceal (' list' , ' syn match pandocUListItemBullet /^>\=\s*\zs[*+-]/ contained containedin=pandocUListItem' , ' conceal cchar=' .s: cchars [' li' ])
489
-
490
- " Ordered lists
491
- syn match pandocListItem / ^\s *(\?\(\d\+\|\l\|\#\| @\) [.)].*$/ nextgroup =pandocListItem,pandocLaTeXMathBlock,pandocLaTeXInlineMath,pandocEscapedDollar,pandocDelimitedCodeBlock,pandocListItemContinuation contains =@Spell,pandocEmphasis,pandocStrong,pandocNoFormatted,pandocStrikeout,pandocSubscript,pandocSuperscript,pandocStrongEmphasis,pandocStrongEmphasis,pandocPCite,pandocICite,pandocCiteKey,pandocReferenceLabel,pandocLaTeXCommand,pandocLaTeXMathBlock,pandocLaTeXInlineMath,pandocEscapedDollar,pandocAutomaticLink,pandocFootnoteDef,pandocFootnoteBlock,pandocFootnoteID,pandocAmpersandEscape skipempty display
492
-
493
- " support for roman numerals up to 'c'
494
- if g: pandoc #syntax #roman_lists != 0
495
- syn match pandocListItem / ^\s *(\? x\= l\=\( i\{ ,3}[vx]\=\)\{ ,3}c\{ ,3}[.)].*$/ nextgroup =pandocListItem,pandocMathBlock,pandocLaTeXInlineMath,pandocEscapedDollar,pandocDelimitedCodeBlock,pandocListItemContinuation,pandocAutomaticLink skipempty display
496
- endif
497
- syn match pandocListItemBullet / ^(\? .\{ -}[.)]/ contained containedin =pandocListItem
498
- syn match pandocListItemBulletId / \(\d\+\|\l\|\#\| @.\{ -}\| x\= l\=\( i\{ ,3}[vx]\=\)\{ ,3}c\{ ,3}\) / contained containedin =pandocListItemBullet
499
-
500
- syn match pandocListItemContinuation / ^\s\+\( [-+*]\s\+\| (\? .\+ [).]\)\@ <!\( [[:upper:][:lower:]_"[]\|\*\S\)\@ =.*$/ nextgroup=pandocLaTeXMathBlock,pandocLaTeXInlineMath,pandocEscapedDollar,pandocDelimitedCodeBlock,pandocListItemContinuation,pandocListItem contains=@Spell,pandocEmphasis,pandocStrong,pandocNoFormatted,pandocStrikeout,pandocSubscript,pandocSuperscript,pandocStrongEmphasis,pandocStrongEmphasis,pandocPCite,pandocICite,pandocCiteKey,pandocReferenceLabel,pandocReferenceURL,pandocLaTeXCommand,pandocLaTeXMathBlock,pandocLaTeXInlineMath,pandocEscapedDollar,pandocAutomaticLink,pandocFootnoteDef,pandocFootnoteBlock,pandocFootnoteID,pandocAmpersandEscape contained skipempty display
501
- " }}}2
502
-
503
- " Definitions: {{{2
504
- if g: pandoc #syntax #use_definition_lists == 1
505
- syn region pandocDefinitionBlock start =/ ^\% (\_ ^\s *\( [`~]\)\1\{ 2,}\)\@ !.*\n\( ^\s *\n\)\=\s\{ 0,2}\( [:~]\)\(\3\{ 2,}\3 *\)\@ !/ skip =/ \n\n\z s\s / end =/ \n\n / contains =pandocDefinitionBlockMark,pandocDefinitionBlockTerm,pandocCodeBlockInsideIndent,pandocEmphasis,pandocStrong,pandocStrongEmphasis,pandocNoFormatted,pandocStrikeout,pandocSubscript,pandocSuperscript,pandocFootnoteID,pandocReferenceURL,pandocReferenceLabel,pandocLaTeXMathBlock,pandocLaTeXInlineMath,pandocEscapedDollar,pandocAutomaticLink,pandocEmDash,pandocEnDash,pandocFootnoteDef,pandocFootnoteBlock,pandocFootnoteID
506
- syn match pandocDefinitionBlockTerm / ^.*\n\( ^\s *\n\)\=\(\s *[:~]\)\@ =/ contained contains =pandocNoFormatted,pandocEmphasis,pandocStrong,pandocLaTeXInlineMath,pandocEscapedDollar,pandocFootnoteDef,pandocFootnoteBlock,pandocFootnoteID nextgroup =pandocDefinitionBlockMark
507
- call s: WithConceal (' definition' , ' syn match pandocDefinitionBlockMark /^\s*[:~]/ contained' , ' conceal cchar=' .s: cchars [' definition' ])
508
- endif
509
- " }}}2
510
-
511
- " Special: {{{2
512
-
513
- " New_lines: {{{3
514
- if g: pandoc #syntax #newlines == 1
515
- call s: WithConceal (' newline' , ' syn match pandocNewLine /\%(\%(\S\)\@<= \{2,}\|\\\)$/ display containedin=pandocEmphasis,pandocStrong,pandocStrongEmphasis,pandocStrongInEmphasis,pandocEmphasisInStrong' , ' conceal cchar=' .s: cchars [' newline' ])
516
- endif
517
- " }}}3
518
-
519
- " Emdashes: {{{3
520
- if &encoding == # ' utf-8'
521
- call s: WithConceal (' emdashes' , ' syn match pandocEllipses /\([^-]\)\@<=---\([^-]\)\@=/ display' , ' conceal cchar=—' )
522
- endif
523
- " }}}3
524
-
525
- " Endashes: {{{3
526
- if &encoding == # ' utf-8'
527
- call s: WithConceal (' endashes' , ' syn match pandocEllipses /\([^-]\)\@<=--\([^-]\)\@=/ display' , ' conceal cchar=–' )
528
- endif
529
- " }}}3
530
-
531
- " Ellipses: {{{3
532
- if &encoding == # ' utf-8'
533
- call s: WithConceal (' ellipses' , ' syn match pandocEllipses /\.\.\./ display' , ' conceal cchar=…' )
534
- endif
535
- " }}}3
536
-
537
- " Quotes: {{{3
538
- if &encoding == # ' utf-8'
539
- call s: WithConceal (' quotes' , ' syn match pandocBeginQuote /"\</ containedin=pandocEmphasis,pandocStrong,pandocListItem,pandocListItemContinuation,pandocUListItem display' , ' conceal cchar=“' )
540
- call s: WithConceal (' quotes' , ' syn match pandocEndQuote /\(\>[[:punct:]]*\)\@<="[[:blank:][:punct:]\n]\@=/ containedin=pandocEmphasis,pandocStrong,pandocUListItem,pandocListItem,pandocListItemContinuation display' , ' conceal cchar=”' )
541
- endif
542
- " }}}3
543
-
544
- " Hrule: {{{3
545
- syn match pandocHRule / ^\s *\( [*\- _]\)\s *\% (\1\s *\)\{ 2,}$/ display
546
- " }}}3
547
-
548
- " Backslashes: {{{3
549
- if g: pandoc #syntax #conceal#backslash == 1
550
- syn match pandocBackslash / \v\\ @<!\\ ((re)?newcommand)@!/ containedin =ALLBUT,pandocCodeblock,pandocCodeBlockInsideIndent,pandocNoFormatted,pandocNoFormattedInEmphasis,pandocNoFormattedInStrong,pandocDelimitedCodeBlock,pandocLineBlock,pandocYAMLHeader conceal
551
- endif
552
- " }}}3
553
-
554
- " &-escaped Special Characters: {{{3
555
- syn match pandocAmpersandEscape / \v\& (#\d +|#x\x +|[[:alnum:]]+)\; / contains =NoSpell
556
- " }}}3
557
-
558
- " YAML: {{{2
559
- try
560
- unlet ! b: current_syntax
561
- syn include @YAML syntax/yaml.vim
562
- catch /E484/
563
- endtry
564
- syn region pandocYAMLHeader start =/ \% (\% ^\|\_ ^\s *\n\)\@ <=\_ ^-\{ 3}\z e\n .\+ / end =/ ^\( [-.]\)\1\{ 2}$/ keepend contains =@YAML containedin =TOP
565
- " }}}2
566
-
567
- " }}}1
568
-
569
- " Styling: {{{1
570
- hi link pandocOperator Operator
571
-
572
- " override this for consistency
573
- hi pandocTitleBlock term = italic gui = italic
574
- hi link pandocTitleBlockTitle Directory
575
- hi link pandocAtxHeader Title
576
- hi link pandocAtxStart Operator
577
- hi link pandocSetexHeader Title
578
- hi link pandocHeaderAttr Comment
579
- hi link pandocHeaderID Identifier
580
-
581
- hi link pandocLaTexSectionCmd texSection
582
- hi link pandocLaTeXDelimiter texDelimiter
583
-
584
- hi link pandocHTMLComment Comment
585
- hi link pandocHTMLCommentStart Delimiter
586
- hi link pandocHTMLCommentEnd Delimiter
587
- hi link pandocBlockQuote Comment
588
- hi link pandocBlockQuoteMark Comment
589
- hi link pandocAmpersandEscape Special
590
-
591
- " if the user sets g:pandoc#syntax#codeblocks#ignore to contain
592
- " a codeblock type, don't highlight it so that it remains Normal
593
- if index (g: pandoc #syntax #codeblocks#ignore , ' definition' ) == -1
594
- hi link pandocCodeBlockInsideIndent String
595
- endif
596
-
597
- if index (g: pandoc #syntax #codeblocks#ignore , ' delimited' ) == -1
598
- hi link pandocDelimitedCodeBlock Special
599
- endif
600
-
601
- hi link pandocDelimitedCodeBlockStart Delimiter
602
- hi link pandocDelimitedCodeBlockEnd Delimiter
603
- hi link pandocDelimitedCodeBlockLanguage Comment
604
- hi link pandocBlockQuoteinDelimitedCodeBlock pandocBlockQuote
605
- hi link pandocCodePre String
606
-
607
- hi link pandocLineBlockDelimiter Delimiter
608
-
609
- hi link pandocListItemBullet Operator
610
- hi link pandocUListItemBullet Operator
611
- hi link pandocListItemBulletId Identifier
612
-
613
- hi link pandocReferenceLabel Label
614
- hi link pandocReferenceURL Underlined
615
- hi link pandocLinkTip Identifier
616
- hi link pandocImageIcon Operator
617
-
618
- hi link pandocReferenceDefinition Operator
619
- hi link pandocReferenceDefinitionLabel Label
620
- hi link pandocReferenceDefinitionAddress Underlined
621
- hi link pandocReferenceDefinitionTip Identifier
622
-
623
- hi link pandocAutomaticLink Underlined
624
-
625
- hi link pandocDefinitionBlockTerm Identifier
626
- hi link pandocDefinitionBlockMark Operator
627
-
628
- hi link pandocSimpleTableDelims Delimiter
629
- hi link pandocSimpleTableHeader pandocStrong
630
- hi link pandocTableMultilineHeader pandocStrong
631
- hi link pandocTableDelims Delimiter
632
- hi link pandocGridTableDelims Delimiter
633
- hi link pandocGridTableHeader Delimiter
634
- hi link pandocPipeTableDelims Delimiter
635
- hi link pandocPipeTableHeader Delimiter
636
- hi link pandocTableHeaderWord pandocStrong
637
-
638
- hi link pandocAbbreviationHead Type
639
- hi link pandocAbbreviation Label
640
- hi link pandocAbbreviationTail Type
641
- hi link pandocAbbreviationSeparator Identifier
642
- hi link pandocAbbreviationDefinition Comment
643
-
644
- hi link pandocFootnoteID Label
645
- hi link pandocFootnoteIDHead Type
646
- hi link pandocFootnoteIDTail Type
647
- hi link pandocFootnoteDef Comment
648
- hi link pandocFootnoteDefHead Type
649
- hi link pandocFootnoteDefTail Type
650
- hi link pandocFootnoteBlock Comment
651
- hi link pandocFootnoteBlockSeparator Operator
652
-
653
- hi link pandocPCite Operator
654
- hi link pandocICite Operator
655
- hi link pandocCiteKey Label
656
- hi link pandocCiteAnchor Operator
657
- hi link pandocCiteLocator Operator
658
-
659
- if g: pandoc #syntax #style#emphases == 1
660
- hi pandocEmphasis gui = italic cterm= italic
661
- hi pandocStrong gui = bold cterm= bold
662
- hi pandocStrongEmphasis gui = bold ,italic cterm= bold ,italic
663
- hi pandocStrongInEmphasis gui = bold ,italic cterm= bold ,italic
664
- hi pandocEmphasisInStrong gui = bold ,italic cterm= bold ,italic
665
- if ! exists (' s:hi_tail' )
666
- let s: fg = ' ' " Vint can't figure ou these get set dynamically
667
- let s: bg = ' ' " so initialize them manually first
668
- for s: i in [' fg' , ' bg' ]
669
- let s: tmp_val = synIDattr (synIDtrans (hlID (' String' )), s: i )
670
- let s: tmp_ui = has (' gui_running' ) || (has (' termguicolors' ) && &termguicolors ) ? ' gui' : ' cterm'
671
- if ! empty (s: tmp_val ) && s: tmp_val != -1
672
- exe ' let s:' .s: i . ' = "' .s: tmp_ui .s: i .' =' .s: tmp_val .' "'
673
- else
674
- exe ' let s:' .s: i . ' = ""'
675
- endif
676
- endfor
677
- let s: hi_tail = ' ' .s: fg .' ' .s: bg
678
- endif
679
- exe ' hi pandocNoFormattedInEmphasis gui=italic cterm=italic' .s: hi_tail
680
- exe ' hi pandocNoFormattedInStrong gui=bold cterm=bold' .s: hi_tail
681
- endif
682
- hi link pandocNoFormatted String
683
- hi link pandocNoFormattedAttrs Comment
684
- hi link pandocSubscriptMark Operator
685
- hi link pandocSuperscriptMark Operator
686
- hi link pandocStrikeoutMark Operator
687
- if g: pandoc #syntax #style#underline_special == 1
688
- hi pandocSubscript gui = underline cterm= underline
689
- hi pandocSuperscript gui = underline cterm= underline
690
- hi pandocStrikeout gui = underline cterm= underline
691
- endif
692
- hi link pandocNewLine Error
693
- hi link pandocHRule Delimiter
694
-
695
- " }}}1
696
21
697
22
let b: current_syntax = ' pandoc'
698
-
699
- syntax sync clear
700
- syntax sync minlines =1000
0 commit comments