1
- " vi: fdm = marker
1
+ " vim: set fdm = marker foldlevel = 0 :
2
+ "
2
3
" Vim syntax file
4
+ "
3
5
" Language: Pandoc (superset of Markdown)
4
6
" Maintainer: Felipe Morales <[email protected] >
5
7
" Contributor: David Sanson <[email protected] >
9
11
10
12
" Configuration: {{{1
11
13
"
12
- " use conceal {{{2
14
+ " use conceal? {{{2
13
15
if ! exists (" g:pandoc#syntax#conceal#use" )
14
16
if v: version < 703
15
17
let g: pandoc #syntax #conceal#use = 0
@@ -113,7 +115,12 @@ if !exists("g:pandoc#syntax#colorcolumn")
113
115
let g: pandoc #syntax #colorcolumn = 0
114
116
endif
115
117
" }}}2
118
+ " highlight new lines? {{{2
119
+ if ! exists (" g:pandoc#syntax#newlines" )
120
+ let g: pandoc #syntax #newlines = 1
121
+ endif
116
122
" }}}
123
+ " }}}1
117
124
118
125
" Functions: {{{1
119
126
" EnableEmbedsforCodeblocksWithLang {{{2
@@ -163,16 +170,23 @@ command! -buffer -nargs=1 -complete=syntax PandocHighlight call EnableEmbedsforC
163
170
command ! - buffer -nargs =1 -complete =syntax PandocUnhighlight call DisableEmbedsforCodeblocksWithLang (<f-args> )
164
171
" }}}
165
172
166
- " BASE: {{{1
173
+ " BASE:
167
174
syntax clear
175
+ syntax spell toplevel
176
+ " apply extra settings: {{{1
177
+ if g: pandoc #syntax #colorcolumn == 1
178
+ exe " setlocal colorcolumn=" .string (&textwidth + 5 )
179
+ elseif g: pandoc #syntax #colorcolumn == 2
180
+ exe " setlocal colorcolumn=" .join (range (&textwidth + 5 , 2 * &columns ), ' ,' )
181
+ endif
168
182
if g: pandoc #syntax #conceal#use != 0
169
183
setlocal conceallevel= 2
170
184
endif
171
- syntax spell toplevel
172
- " }}}
185
+ " }}}1
173
186
174
- " Embeds: {{{1
175
- " HTML: {{{2
187
+ " Syntax Rules: {{{1
188
+ " Embeds: {{{2
189
+ " HTML: {{{3
176
190
" Set embedded HTML highlighting
177
191
syn include @HTML syntax/html.vim
178
192
syn match pandocHTML / <\/\?\a [^>]\+ >/ contains =@HTML
@@ -181,7 +195,7 @@ syn region pandocHTMLComment start=/<!--\s\=/ end=/\s\=-->/ keepend contains=pan
181
195
call s: WithConceal (' html_c_s' , ' syn match pandocHTMLCommentStart /<!--/ contained' , ' conceal cchar=' .s: cchars [' html_c_s' ])
182
196
call s: WithConceal (' html_c_e' , ' syn match pandocHTMLCommentEnd /-->/ contained' , ' conceal cchar=' .s: cchars [' html_c_e' ])
183
197
" }}}
184
- " LaTeX: {{{2
198
+ " LaTeX: {{{3
185
199
" Set embedded LaTex (pandoc extension) highlighting
186
200
" Unset current_syntax so the 2nd include will work
187
201
unlet b: current_syntax
@@ -196,34 +210,28 @@ syn region pandocLaTeXRegion start=/\\begin{\z(.\{-}\)}/ end=/\\end{\z1}/ keepen
196
210
syn region pandocLaTexSection start =/ \\\( part\| chapter\|\( sub\)\{ ,2}section\|\( sub\)\= paragraph\)\*\=\(\[ .*\]\)\= {/ end =/ \} / keepend
197
211
syn match pandocLaTexSectionCmd / \\\( part\| chapter\|\( sub\)\{ ,2}section\|\( sub\)\= paragraph\) / contained containedin =pandocLaTexSection
198
212
syn match pandocLaTeXDelimiter / [[\] {}]/ contained containedin=pandocLaTexSection
199
- hi link pandocLaTexSectionCmd texSection
200
- hi link pandocLaTeXDelimiter texDelimiter
201
213
" }}}}
202
- " }}}
203
-
204
- " Titleblock: {{{1
214
+ " }}}2
215
+ " Titleblock: {{{2
205
216
"
206
217
syn region pandocTitleBlock start =/ \% ^%/ end =/ \n\n / contains =pandocReferenceLabel,pandocReferenceURL,pandocNewLine
207
218
call s: WithConceal (" titleblock" , ' syn match pandocTitleBlockMark /%\ / contained containedin=pandocTitleBlock,pandocTitleBlockTitle' , ' conceal' )
208
219
syn match pandocTitleBlockTitle / \% ^%.*\n / contained containedin =pandocTitleBlock
209
220
" }}}
210
-
211
- " Blockquotes: {{{1
221
+ " Blockquotes: {{{2
212
222
"
213
223
syn match pandocBlockQuote / ^\s\{ ,3}>.*\n\( .*\n\@ 1<!\n\) */ contains =@Spell,pandocEmphasis,pandocStrong,pandocPCite,pandocSuperscript,pandocSubscript,pandocStrikeout,pandocUListItem,pandocNoFormatted skipnl
214
224
215
225
" }}}
216
-
217
- " Code Blocks: {{{1
226
+ " Code Blocks: {{{2
218
227
if g: pandoc #syntax #protect#codeblocks == 1
219
228
syn match pandocCodeblock / \s\{ 4}.*$/
220
229
endif
221
230
syn region pandocCodeBlockInsideIndent start =/ \(\(\d\|\a\| *\) .*\n\)\@ <!\( ^\(\s\{ 8,}\|\t\+\)\) .*\n / end =/ .\(\n ^\s *\n\)\@ =/ contained
222
231
" }}}
223
-
224
- " Links: {{{1
232
+ " Links: {{{2
225
233
"
226
- " Base: {{{2
234
+ " Base: {{{3
227
235
syn region pandocReferenceLabel matchgroup =Operator start =/ !\{ ,1}\[ / skip =/ \(\]\]\@ =\| `.*].*`\) / end =/ \] / keepend display
228
236
if g: pandoc #syntax #conceal#urls == 1
229
237
syn region pandocReferenceURL matchgroup =Operator start =/ \]\@ 1<=(/ end =/ )/ keepend display conceal
@@ -235,18 +243,17 @@ syn match pandocNoLabel /\]\@1<!\s\+\[[^\[\]]\{-}\]\s\+[\[(]\@!/ contains=pandoc
235
243
syn match pandocLinkTip / \s *".\{ -}"/ contained containedin =pandocReferenceURL contains =@Spell display
236
244
call s: WithConceal (" image" , ' syn match pandocImageIcon /!\[\@=/ display' , ' conceal cchar=' . s: cchars [" image" ])
237
245
" }}}
238
- " Definitions: {{{2
246
+ " Definitions: {{{3
239
247
syn region pandocReferenceDefinition start =/ \[ .\{ -}\] :/ end =/ \(\n\s *".*"$\| $\) / keepend
240
248
syn match pandocReferenceDefinitionLabel / \[\z s.\{ -}\z e\] :/ contained containedin =pandocReferenceDefinition display
241
249
syn match pandocReferenceDefinitionAddress / :\s *\z s.*/ contained containedin =pandocReferenceDefinition
242
250
syn match pandocReferenceDefinitionTip / \s *".\{ -}"/ contained containedin =pandocReferenceDefinition,pandocReferenceDefinitionAddress contains =@Spell
243
251
" }}}
244
- " Automatic_links: {{{2
252
+ " Automatic_links: {{{3
245
253
syn match pandocAutomaticLink / <\( https\{ 0,1}.\{ -}\| .\{ -}@.\{ -}\. .\{ -}\) >/
246
254
" }}}
247
255
" }}}
248
-
249
- " Citations: {{{1
256
+ " Citations: {{{2
250
257
" parenthetical citations
251
258
syn match pandocPCite / \[ .\{ -}-\{ 0,1}@.\{ -}\] / contains =pandocEmphasis,pandocStrong,pandocLatex,pandocCiteKey,@Spell display
252
259
" in-text citations with location
@@ -256,31 +263,30 @@ syn match pandocCiteKey /\(-\=@[[:graph:]äëïöüáéíóúàèìòùłßÄË
256
263
syn match pandocCiteAnchor / [-@]/ contained containedin =pandocCiteKey display
257
264
syn match pandocCiteLocator / [\[\] ]/ contained containedin =pandocPCite,pandocICite
258
265
" }}}
266
+ " Text Styles: {{{2
259
267
260
- " Text Styles: {{{1
261
-
262
- " Emphasis: {{{2
268
+ " Emphasis: {{{3
263
269
"
264
270
call s: WithConceal (" block" , ' syn region pandocEmphasis matchgroup=Operator start=/\\\@1<!\(\_^\|\s\|[[:punct:]]\)\@<=\*\S\@=/ skip=/\(\*\*\|__\)/ end=/\*\([[:punct:]]\|\s\|\_$\)\@=/ contains=@Spell,pandocNoFormattedInEmphasis,pandocLatexInlineMath' , ' concealends' )
265
271
call s: WithConceal (" block" , ' syn region pandocEmphasis matchgroup=Operator start=/\\\@1<!\(\_^\|\s\|[[:punct:]]\)\@<=_\S\@=/ skip=/\(\*\*\|__\)/ end=/\S\@1<=_\([[:punct:]]\|\s\|\_$\)\@=/ contains=@Spell,pandocNoFormattedInEmphasis,pandocLatexInlineMath' , ' concealends' )
266
272
" }}}
267
- " Strong: {{{2
273
+ " Strong: {{{3
268
274
"
269
275
call s: WithConceal (" block" , ' syn region pandocStrong matchgroup=Operator start=/\(\\\@<!\*\)\{2}/ end=/\(\\\@<!\*\)\{2}/ contains=@Spell,pandocNoFormattedInStrong,pandocLatexInlineMath' , ' concealends' )
270
276
call s: WithConceal (" block" , ' syn region pandocStrong matchgroup=Operator start=/__/ end=/__/ contains=@Spell,pandocNoFormattedInStrong,pandocLatexInlineMath' , ' concealends' )
271
277
" }}}
272
- " Strong Emphasis: {{{2
278
+ " Strong Emphasis: {{{3
273
279
"
274
280
call s: WithConceal (" block" , ' syn region pandocStrongEmphasis matchgroup=Operator start=/\*\{3}\(\S[^*]*\(\*\S\|\n[^*]*\*\S\)\)\@=/ end=/\S\@<=\*\{3}/ contains=@Spell' , ' concealends' )
275
281
call s: WithConceal (" block" , ' syn region pandocStrongEmphasis matchgroup=Operator start=/\(___\)\S\@=/ end=/\S\@<=___/ contains=@Spell' , ' concealends' )
276
282
" }}}
277
- " Mixed: {{{2
283
+ " Mixed: {{{3
278
284
call s: WithConceal (" block" , ' syn region pandocStrongInEmphasis matchgroup=Operator start=/\*\*/ end=/\*\*/ contained containedin=pandocEmphasis contains=@Spell' , ' concealends' )
279
285
call s: WithConceal (" block" , ' syn region pandocStrongInEmphasis matchgroup=Operator start=/__/ end=/__/ contained containedin=pandocEmphasis contains=@Spell' , ' concealends' )
280
286
call s: WithConceal (" block" , ' syn region pandocEmphasisInStrong matchgroup=Operator start=/\\\@1<!\(\_^\|\s\|[[:punct:]]\)\@<=\*\S\@=/ skip=/\(\*\*\|__\)/ end=/\S\@<=\*\([[:punct:]]\|\s\|\_$\)\@=/ contained containedin=pandocStrong contains=@Spell' , ' concealends' )
281
287
call s: WithConceal (" block" , ' syn region pandocEmphasisInStrong matchgroup=Operator start=/\\\@<!\(\_^\|\s\|[[:punct:]]\)\@<=_\S\@=/ skip=/\(\*\*\|__\)/ end=/\S\@<=_\([[:punct:]]\|\s\|\_$\)\@=/ contained containedin=pandocStrong contains=@Spell' , ' concealends' )
282
288
283
- " Inline Code: {{{2
289
+ " Inline Code: {{{3
284
290
285
291
" Using single back ticks
286
292
call s: WithConceal (" inlinecode" , ' syn region pandocNoFormatted matchgroup=Operator start=/\\\@<!`/ end=/\\\@<!`/ nextgroup=pandocNoFormattedAttrs' , ' concealends' )
@@ -292,21 +298,20 @@ call s:WithConceal("inlinecode", 'syn region pandocNoFormattedInEmphasis matchgr
292
298
call s: WithConceal (" inlinecode" , ' syn region pandocNoFormattedInStrong matchgroup=Operator start=/\\\@<!``/ end=/\\\@<!``/ nextgroup=pandocNoFormattedAttrs contained' , ' concealends' )
293
299
syn match pandocNoFormattedAttrs / {.\{ -}}/ contained
294
300
" }}}
295
- " Subscripts: {{{2
301
+ " Subscripts: {{{3
296
302
syn region pandocSubscript start =/ \~\(\( [[:graph:]]\(\\ \)\=\)\{ -}\~\)\@ =/ end =/ \~ / keepend
297
303
call s: WithConceal (" subscript" , ' syn match pandocSubscriptMark /\~/ contained containedin=pandocSubscript' , ' conceal cchar=' .s: cchars [" sub" ])
298
304
" }}}
299
- " Superscript: {{{2
305
+ " Superscript: {{{3
300
306
syn region pandocSuperscript start =/ \^\(\( [[:graph:]]\(\\ \)\=\)\{ -}\^\)\@ =/ skip =/ \\ / end =/ \^ / keepend
301
307
call s: WithConceal (" superscript" , ' syn match pandocSuperscriptMark /\^/ contained containedin=pandocSuperscript' , ' conceal cchar=' .s: cchars [" super" ])
302
308
" }}}
303
- " Strikeout: {{{2
309
+ " Strikeout: {{{3
304
310
syn region pandocStrikeout start =/ \~\~ / end =/ \~\~ / contains =@Spell keepend
305
311
call s: WithConceal (" strikeout" , ' syn match pandocStrikeoutMark /\~\~/ contained containedin=pandocStrikeout' , ' conceal cchar=' .s: cchars [" strike" ])
306
312
" }}}
307
313
" }}}
308
-
309
- " Headers: {{{1
314
+ " Headers: {{{2
310
315
"
311
316
syn match pandocAtxHeader / \(\% ^\| <.\+ >.*\n\| ^\s *\n\)\@ <=#\{ 1,6}.*\n / contains =pandocEmphasis,pandocStrong,pandocNoFormatted,pandocLaTeXInlineMath,@Spell, display
312
317
syn match pandocAtxHeaderMark / \( ^#\{ 1,6}\|\\\@ <!#\+\(\s *.*$\)\@ =\) / contained containedin =pandocAtxHeader
@@ -316,54 +321,41 @@ syn match pandocSetexHeader /^.\+\n[-]\+$/ contains=pandocEmphasis,pandocStrong,
316
321
syn match pandocHeaderAttr / {.*}/ contained containedin =pandocAtxHeader,pandocSetexHeader
317
322
syn match pandocHeaderID / #[-_:.[:alpha:]]*/ contained containedin =pandocHeaderAttr
318
323
" }}}
319
-
320
- " Line Blocks: {{{1
324
+ " Line Blocks: {{{2
321
325
syn region pandocLineBlock start =/ ^|/ end =/ \( ^|\( .*\n |\@ !\)\@ =.*\)\@ <=\n /
322
326
syn match pandocLineBlockDelimiter / ^|/ contained containedin =pandocLineBlock
323
- hi link pandocLineBlockDelimiter Delimiter
324
327
" }}}
328
+ " Tables: {{{2
325
329
326
- " Tables: {{{1
327
-
328
- " Simple: {{{2
330
+ " Simple: {{{3
329
331
330
332
syn region pandocSimpleTable start =/ \% #=2\( ^.*[[:graph:]].*\n\)\@ <!\( ^.*[[:graph:]].*\n\)\( -\+\s *\)\+\n\n\@ !/ end =/ \n\n / containedin =ALLBUT,pandocDelimitedCodeBlock keepend
331
333
syn match pandocSimpleTableDelims / \- / contained containedin =pandocSimpleTable
332
334
syn match pandocSimpleTableHeader / \% #=2\( ^.*[[:graph:]].*\n\)\@ <!\( ^.*[[:graph:]].*\n\) / contained containedin =pandocSimpleTable
333
- hi link pandocSimpleTableDelims Delimiter
334
- hi link pandocSimpleTableHeader pandocStrong
335
335
336
336
syn region pandocTable start =/ \% #=2^\( -\+\s *\)\+\n\n\@ !/ end =/ \% #=2^\( -\+\s *\)\+\n\n / containedin =ALLBUT,pandocDelimitedCodeBlock keepend
337
337
syn match pandocTableDelims / \- / contained containedin =pandocTable
338
338
syn region pandocTableMultilineHeader start =/ \% #=2\( ^-\+\n\)\@ <=./ end =/ \% #=2\n -\@ =/ contained containedin =pandocTable
339
- hi link pandocTableMultilineHeader pandocStrong
340
- hi link pandocTableDelims Delimiter
341
339
342
- " }}}2
343
- " Grid: {{{2
340
+ " }}}3
341
+ " Grid: {{{3
344
342
syn region pandocGridTable start =/ \% #=2\n\@ 1<=+-/ end =/ +\n\n / containedin =ALLBUT,pandocDelimitedCodeBlock keepend
345
343
syn match pandocGridTableDelims / [\| =]/ contained containedin =pandocGridTable
346
344
syn match pandocGridTableDelims / \% #=2\( [\- +][\- +=]\@ =\| [\- +=]\@ 1<=[\- +]\) / contained containedin =pandocGridTable
347
345
syn match pandocGridTableHeader / \% #=2\( ^.*\n\)\( +=.*\)\@ =/ contained containedin =pandocGridTable
348
- hi link pandocGridTableDelims Delimiter
349
- hi link pandocGridTableHeader Delimiter
350
- " }}}2
351
- " Pipe: {{{2
346
+ " }}}3
347
+ " Pipe: {{{3
352
348
" with beginning and end pipes
353
349
syn region pandocPipeTable start =/ \% #=2\( [+|]\n\)\@ <!\n\@ 1<=|\( .*|\)\@ =/ end =/ |.*\n\n / containedin =ALLBUT,pandocDelimitedCodeBlock keepend
354
350
" without beginning and end pipes
355
351
syn region pandocPipeTable start =/ \% #=2^.*\n -.\{ -}|/ end =/ |.*\n\n / keepend
356
352
syn match pandocPipeTableDelims / [\|\- :+]/ contained containedin =pandocPipeTable
357
353
syn match pandocPipeTableHeader / \( ^.*\n\)\( |-\)\@ =/ contained containedin =pandocPipeTable
358
354
syn match pandocPipeTableHeader / \( ^.*\n\)\( -\)\@ =/ contained containedin =pandocPipeTable
359
- hi link pandocPipeTableDelims Delimiter
360
- hi link pandocPipeTableHeader Delimiter
361
- " }}}2
355
+ " }}}3
362
356
syn match pandocTableHeaderWord / \< .\{ -}\> / contained containedin =pandocGridTableHeader,pandocPipeTableHeader
363
- hi link pandocTableHeaderWord pandocStrong
364
- " }}}1
365
-
366
- " Delimited Code Blocks: {{{1
357
+ " }}}2
358
+ " Delimited Code Blocks: {{{2
367
359
" this is here because we can override strikeouts and subscripts
368
360
syn region pandocDelimitedCodeBlock start =/ ^\( >\s\)\?\z (\(\s\{ 4,}\)\=\~\{ 3,}\~ *\) / end =/ \z 1\~ */ skipnl contains =pandocDelimitedCodeBlockStart,pandocDelimitedCodeBlockEnd keepend
369
361
syn region pandocDelimitedCodeBlock start =/ ^\( >\s\)\?\z (\(\s\{ 4,}\)\= `\{ 3,}`*\) / end =/ \z 1`*/ skipnl contains =pandocDelimitedCodeBlockStart,pandocDelimitedCodeBlockEnd keepend
@@ -387,16 +379,14 @@ if g:pandoc#syntax#codeblocks#embeds#use != 0
387
379
endfor
388
380
endif
389
381
" }}}
390
-
391
- " Abbreviations: {{{1
382
+ " Abbreviations: {{{2
392
383
syn region pandocAbbreviationDefinition start =/ ^\*\[ .\{ -}\] :\s */ end =" $" contains =pandocNoFormatted,@Spell
393
384
call s: WithConceal (' abbrev' , ' syn match pandocAbbreviationSeparator /:/ contained containedin=pandocAbbreviationDefinition' , " conceal cchar=" .s: cchars [" abbrev" ])
394
385
syn match pandocAbbreviation / \*\[ .\{ -}\] / contained containedin =pandocAbbreviationDefinition
395
386
call s: WithConceal (' abbrev' , ' syn match pandocAbbreviationHead /\*\[/ contained containedin=pandocAbbreviation' , " conceal" )
396
387
call s: WithConceal (' abbrev' , ' syn match pandocAbbreviationTail /\]/ contained containedin=pandocAbbreviation' , " conceal" )
397
388
" }}}
398
-
399
- " Footnotes: {{{1
389
+ " Footnotes: {{{2
400
390
" we put these here not to interfere with superscripts.
401
391
"
402
392
syn match pandocFootnoteID / \[\^ [^\] ]\+\] / nextgroup =pandocFootnoteDef
@@ -412,15 +402,13 @@ syn match pandocFootnoteID /\[\^.\{-}\]/ contained containedin=pandocFootnoteBlo
412
402
call s: WithConceal (" footnote" , ' syn match pandocFootnoteIDHead /\[\^/ contained containedin=pandocFootnoteID' , ' conceal cchar=' .s: cchars [" footnote" ])
413
403
call s: WithConceal (" footnote" , ' syn match pandocFootnoteIDTail /\]/ contained containedin=pandocFootnoteID' , ' conceal' )
414
404
" }}}
415
-
416
- " Definitions: {{{1
405
+ " Definitions: {{{2
417
406
"
418
407
syn region pandocDefinitionBlock start =/ ^\% (\_ ^\s *\( [`~]\)\1\{ 2,}\)\@ !.*\n\( ^\s *\n\) *\s\{ 0,2}[:~]\(\~\{ 2,}\~ *\)\@ !/ skip =/ \n\n\z s\s / end =/ \n\n / contains =pandocDefinitionBlockMark,pandocDefinitionBlockTerm,pandocCodeBlockInsideIndent,pandocEmphasis,pandocStrong,pandocStrongEmphasis,pandocNoFormatted,pandocStrikeout,pandocSubscript,pandocSuperscript,pandocFootnoteID,pandocReferenceURL,pandocReferenceLabel,pandocAutomaticLink,pandocEmDash,pandocEnDash keepend
419
408
syn match pandocDefinitionBlockTerm / ^.*\n\( ^\s *\n\) *\(\s *[:~]\)\@ =/ contained contains =pandocNoFormatted,pandocEmphasis,pandocStrong
420
409
call s: WithConceal (" definition" , ' syn match pandocDefinitionBlockMark /^\s*[:~]/ contained' , ' conceal cchar=' .s: cchars [" definition" ])
421
410
" }}}
422
-
423
- " List Items: {{{1
411
+ " List Items: {{{2
424
412
"
425
413
" Unordered lists
426
414
syn match pandocUListItem / ^>\=\s *[*+-]\s\+ -\@ !.*$/ nextgroup =pandocUListItem,pandocLaTeXMathBlock,pandocLaTeXInlineMath,pandocDelimitedCodeBlock,pandocListItemContinuation contains =@Spell,pandocEmphasis,pandocStrong,pandocNoFormatted,pandocStrikeout,pandocSubscript,pandocSuperscript,pandocStrongEmphasis,pandocStrongEmphasis,pandocPCite,pandocICite,pandocCiteKey,pandocReferenceLabel,pandocLaTeXMathBlock,pandocLaTeXInlineMath,pandocReferenceURL skipempty display
@@ -435,28 +423,28 @@ syn match pandocListItemBulletId /\(\d\+\|\l\|\#\|@.\{-}\|x\=l\=\(i\{,3}[vx]\=\)
435
423
436
424
syn match pandocListItemContinuation / ^\s\+\(\( [-+*]\| (\? .\+ [).]\)\@ <![[:alpha:]ñäëïöüáéíóúàèìòùłßÄËÏÖÜÁÉÍÓÚÀÈÌÒÙŁß_"[]\)\@ =.*$/ nextgroup=pandocLaTeXMathBlock,pandocLaTeXInlineMath,pandocDelimitedCodeBlock,pandocListItemContinuation,pandocListItem contains=@Spell,pandocEmphasis,pandocStrong,pandocNoFormatted,pandocStrikeout,pandocSubscript,pandocSuperscript,pandocStrongEmphasis,pandocStrongEmphasis,pandocPCite,pandocICite,pandocCiteKey,pandocReferenceLabel,pandocReferenceURL,pandocLaTeXMathBlock,pandocLaTeXInlineMath contained skipempty display
437
425
" }}}
426
+ " Special: {{{2
438
427
439
- " Special : {{{1
440
-
441
- " New_lines: {{{2
442
- call s: WithConceal ( " newline " , ' syn match pandocNewLine /\( \|\\\)$/ display containedin=pandocEmphasis,pandocStrong,pandocStrongEmphasis,pandocStrongInEmphasis,pandocEmphasisInStrong ' , ' conceal cchar= ' . s: cchars [ " newline " ])
428
+ " New_lines : {{{3
429
+ if g: pandoc # syntax #newlines == 1
430
+ call s: WithConceal ( " newline " , ' syn match pandocNewLine /\( \|\\\)$/ display containedin=pandocEmphasis,pandocStrong,pandocStrongEmphasis,pandocStrongInEmphasis,pandocEmphasisInStrong ' , ' conceal cchar= ' . s: cchars [ " newline " ])
431
+ endif
443
432
" }}}
444
- " Ellipses: {{{2
433
+ " Ellipses: {{{3
445
434
if &encoding == " utf-8"
446
435
call s: WithConceal (" ellipses" , ' syn match pandocEllipses /\.\.\./ display' , ' conceal cchar=…' )
447
436
endif
448
437
" }}}
449
- " Quotes: {{{2
438
+ " Quotes: {{{3
450
439
if &encoding == " utf-8"
451
440
call s: WithConceal (" quotes" , ' syn match pandocBeginQuote /"\</ containedin=pandocEmphasis,pandocStrong,pandocListItem,pandocListItemContinuation,pandocUListItem display' , ' conceal cchar=“' )
452
441
call s: WithConceal (" quotes" , ' syn match pandocEndQuote /\(\>[[:punct:]]*\)\@<="[[:blank:][:punct:]\n]\@=/ containedin=pandocEmphasis,pandocStrong,pandocUListItem,pandocListItem,pandocListItemContinuation display' , ' conceal cchar=”' )
453
442
endif
454
- " Hrule: {{{2
443
+ " Hrule: {{{3
455
444
syn match pandocHRule / \*\{ 3}$/ display
456
445
" }}}
457
446
" }}}
458
-
459
- " YAML: {{{1
447
+ " YAML: {{{2
460
448
461
449
try
462
450
unlet ! b: current_syntax
@@ -465,6 +453,7 @@ catch /E484/
465
453
endtry
466
454
syn region pandocYAMLHeader matchgroup =Delimiter start =/ \(\% ^\|\(\s *.*\n\)\)\@ <=\-\{ 3}\s *$/ end =/ [\- |\. ]\{ 3}\s *$/ contains =@YAML containedin =TOP
467
455
" }}}
456
+ " }}}1
468
457
469
458
" Styling: {{{1
470
459
" override this for consistency
@@ -476,6 +465,9 @@ hi link pandocSetexHeader Title
476
465
hi link pandocHeaderAttr Comment
477
466
hi link pandocHeaderID Identifier
478
467
468
+ hi link pandocLaTexSectionCmd texSection
469
+ hi link pandocLaTeXDelimiter texDelimiter
470
+
479
471
hi link pandocHTMLComment Comment
480
472
hi link pandocHTMLCommentStart Delimiter
481
473
hi link pandocHTMLCommentEnd Delimiter
@@ -497,6 +489,9 @@ hi link pandocDelimitedCodeBlockEnd Delimiter
497
489
hi link pandocDelimitedCodeBlockLanguage Comment
498
490
hi link pandocBlockQuoteinDelimitedCodeBlock pandocBlockQuote
499
491
hi link pandocCodePre String
492
+
493
+ hi link pandocLineBlockDelimiter Delimiter
494
+
500
495
hi link pandocListItemBullet Operator
501
496
hi link pandocUListItemBullet Operator
502
497
hi link pandocListItemBulletId Identifier
@@ -516,6 +511,16 @@ hi link pandocAutomaticLink Underlined
516
511
hi link pandocDefinitionBlockTerm Identifier
517
512
hi link pandocDefinitionBlockMark Operator
518
513
514
+ hi link pandocSimpleTableDelims Delimiter
515
+ hi link pandocSimpleTableHeader pandocStrong
516
+ hi link pandocTableMultilineHeader pandocStrong
517
+ hi link pandocTableDelims Delimiter
518
+ hi link pandocGridTableDelims Delimiter
519
+ hi link pandocGridTableHeader Delimiter
520
+ hi link pandocPipeTableDelims Delimiter
521
+ hi link pandocPipeTableHeader Delimiter
522
+ hi link pandocTableHeaderWord pandocStrong
523
+
519
524
hi link pandocAbbreviationHead Type
520
525
hi link pandocAbbreviation Label
521
526
hi link pandocAbbreviationTail Type
@@ -577,9 +582,3 @@ let b:current_syntax = "pandoc"
577
582
578
583
syntax sync clear
579
584
syntax sync minlines =100
580
-
581
- if g: pandoc #syntax #colorcolumn == 1
582
- exe " setlocal colorcolumn=" .string (&textwidth + 5 )
583
- elseif g: pandoc #syntax #colorcolumn == 2
584
- exe " setlocal colorcolumn=" .join (range (&textwidth + 5 , 2 * &columns ), ' ,' )
585
- endif
0 commit comments