1- " vi: fdm = marker
1+ " vim: set fdm = marker foldlevel = 0 :
2+ "
23" Vim syntax file
4+ "
35" Language: Pandoc (superset of Markdown)
46" Maintainer: Felipe Morales <hel.sheep@gmail.com>
57" Contributor: David Sanson <dsanson@gmail.com>
911
1012" Configuration: {{{1
1113"
12- " use conceal {{{2
14+ " use conceal? {{{2
1315if ! exists (" g:pandoc#syntax#conceal#use" )
1416 if v: version < 703
1517 let g: pandoc #syntax #conceal#use = 0
@@ -113,7 +115,12 @@ if !exists("g:pandoc#syntax#colorcolumn")
113115 let g: pandoc #syntax #colorcolumn = 0
114116endif
115117" }}}2
118+ " highlight new lines? {{{2
119+ if ! exists (" g:pandoc#syntax#newlines" )
120+ let g: pandoc #syntax #newlines = 1
121+ endif
116122" }}}
123+ " }}}1
117124
118125" Functions: {{{1
119126" EnableEmbedsforCodeblocksWithLang {{{2
@@ -163,16 +170,23 @@ command! -buffer -nargs=1 -complete=syntax PandocHighlight call EnableEmbedsforC
163170command ! - buffer -nargs =1 -complete =syntax PandocUnhighlight call DisableEmbedsforCodeblocksWithLang (<f-args> )
164171" }}}
165172
166- " BASE: {{{1
173+ " BASE:
167174syntax 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
168182if g: pandoc #syntax #conceal#use != 0
169183 setlocal conceallevel= 2
170184endif
171- syntax spell toplevel
172- " }}}
185+ " }}}1
173186
174- " Embeds: {{{1
175- " HTML: {{{2
187+ " Syntax Rules: {{{1
188+ " Embeds: {{{2
189+ " HTML: {{{3
176190" Set embedded HTML highlighting
177191syn include @HTML syntax/html.vim
178192syn match pandocHTML / <\/\?\a [^>]\+ >/ contains =@HTML
@@ -181,7 +195,7 @@ syn region pandocHTMLComment start=/<!--\s\=/ end=/\s\=-->/ keepend contains=pan
181195call s: WithConceal (' html_c_s' , ' syn match pandocHTMLCommentStart /<!--/ contained' , ' conceal cchar=' .s: cchars [' html_c_s' ])
182196call s: WithConceal (' html_c_e' , ' syn match pandocHTMLCommentEnd /-->/ contained' , ' conceal cchar=' .s: cchars [' html_c_e' ])
183197" }}}
184- " LaTeX: {{{2
198+ " LaTeX: {{{3
185199" Set embedded LaTex (pandoc extension) highlighting
186200" Unset current_syntax so the 2nd include will work
187201unlet b: current_syntax
@@ -196,34 +210,28 @@ syn region pandocLaTeXRegion start=/\\begin{\z(.\{-}\)}/ end=/\\end{\z1}/ keepen
196210syn region pandocLaTexSection start =/ \\\( part\| chapter\|\( sub\)\{ ,2}section\|\( sub\)\= paragraph\)\*\=\(\[ .*\]\)\= {/ end =/ \} / keepend
197211syn match pandocLaTexSectionCmd / \\\( part\| chapter\|\( sub\)\{ ,2}section\|\( sub\)\= paragraph\) / contained containedin =pandocLaTexSection
198212syn match pandocLaTeXDelimiter / [[\] {}]/ contained containedin=pandocLaTexSection
199- hi link pandocLaTexSectionCmd texSection
200- hi link pandocLaTeXDelimiter texDelimiter
201213" }}}}
202- " }}}
203-
204- " Titleblock: {{{1
214+ " }}}2
215+ " Titleblock: {{{2
205216"
206217syn region pandocTitleBlock start =/ \% ^%/ end =/ \n\n / contains =pandocReferenceLabel,pandocReferenceURL,pandocNewLine
207218call s: WithConceal (" titleblock" , ' syn match pandocTitleBlockMark /%\ / contained containedin=pandocTitleBlock,pandocTitleBlockTitle' , ' conceal' )
208219syn match pandocTitleBlockTitle / \% ^%.*\n / contained containedin =pandocTitleBlock
209220" }}}
210-
211- " Blockquotes: {{{1
221+ " Blockquotes: {{{2
212222"
213223syn match pandocBlockQuote / ^\s\{ ,3}>.*\n\( .*\n\@ 1<!\n\) */ contains =@Spell,pandocEmphasis,pandocStrong,pandocPCite,pandocSuperscript,pandocSubscript,pandocStrikeout,pandocUListItem,pandocNoFormatted skipnl
214224
215225" }}}
216-
217- " Code Blocks: {{{1
226+ " Code Blocks: {{{2
218227if g: pandoc #syntax #protect#codeblocks == 1
219228 syn match pandocCodeblock / \s\{ 4}.*$/
220229endif
221230syn region pandocCodeBlockInsideIndent start =/ \(\(\d\|\a\| *\) .*\n\)\@ <!\( ^\(\s\{ 8,}\|\t\+\)\) .*\n / end =/ .\(\n ^\s *\n\)\@ =/ contained
222231" }}}
223-
224- " Links: {{{1
232+ " Links: {{{2
225233"
226- " Base: {{{2
234+ " Base: {{{3
227235syn region pandocReferenceLabel matchgroup =Operator start =/ !\{ ,1}\[ / skip =/ \(\]\]\@ =\| `.*].*`\) / end =/ \] / keepend display
228236if g: pandoc #syntax #conceal#urls == 1
229237 syn region pandocReferenceURL matchgroup =Operator start =/ \]\@ 1<=(/ end =/ )/ keepend display conceal
@@ -235,18 +243,17 @@ syn match pandocNoLabel /\]\@1<!\s\+\[[^\[\]]\{-}\]\s\+[\[(]\@!/ contains=pandoc
235243syn match pandocLinkTip / \s *".\{ -}"/ contained containedin =pandocReferenceURL contains =@Spell display
236244call s: WithConceal (" image" , ' syn match pandocImageIcon /!\[\@=/ display' , ' conceal cchar=' . s: cchars [" image" ])
237245" }}}
238- " Definitions: {{{2
246+ " Definitions: {{{3
239247syn region pandocReferenceDefinition start =/ \[ .\{ -}\] :/ end =/ \(\n\s *".*"$\| $\) / keepend
240248syn match pandocReferenceDefinitionLabel / \[\z s.\{ -}\z e\] :/ contained containedin =pandocReferenceDefinition display
241249syn match pandocReferenceDefinitionAddress / :\s *\z s.*/ contained containedin =pandocReferenceDefinition
242250syn match pandocReferenceDefinitionTip / \s *".\{ -}"/ contained containedin =pandocReferenceDefinition,pandocReferenceDefinitionAddress contains =@Spell
243251" }}}
244- " Automatic_links: {{{2
252+ " Automatic_links: {{{3
245253syn match pandocAutomaticLink / <\( https\{ 0,1}.\{ -}\| .\{ -}@.\{ -}\. .\{ -}\) >/
246254" }}}
247255" }}}
248-
249- " Citations: {{{1
256+ " Citations: {{{2
250257" parenthetical citations
251258syn match pandocPCite / \[ .\{ -}-\{ 0,1}@.\{ -}\] / contains =pandocEmphasis,pandocStrong,pandocLatex,pandocCiteKey,@Spell display
252259" in-text citations with location
@@ -256,31 +263,30 @@ syn match pandocCiteKey /\(-\=@[[:graph:]äëïöüáéíóúàèìòùłßÄË
256263syn match pandocCiteAnchor / [-@]/ contained containedin =pandocCiteKey display
257264syn match pandocCiteLocator / [\[\] ]/ contained containedin =pandocPCite,pandocICite
258265" }}}
266+ " Text Styles: {{{2
259267
260- " Text Styles: {{{1
261-
262- " Emphasis: {{{2
268+ " Emphasis: {{{3
263269"
264270call s: WithConceal (" block" , ' syn region pandocEmphasis matchgroup=Operator start=/\\\@1<!\(\_^\|\s\|[[:punct:]]\)\@<=\*\S\@=/ skip=/\(\*\*\|__\)/ end=/\*\([[:punct:]]\|\s\|\_$\)\@=/ contains=@Spell,pandocNoFormattedInEmphasis,pandocLatexInlineMath' , ' concealends' )
265271call s: WithConceal (" block" , ' syn region pandocEmphasis matchgroup=Operator start=/\\\@1<!\(\_^\|\s\|[[:punct:]]\)\@<=_\S\@=/ skip=/\(\*\*\|__\)/ end=/\S\@1<=_\([[:punct:]]\|\s\|\_$\)\@=/ contains=@Spell,pandocNoFormattedInEmphasis,pandocLatexInlineMath' , ' concealends' )
266272" }}}
267- " Strong: {{{2
273+ " Strong: {{{3
268274"
269275call s: WithConceal (" block" , ' syn region pandocStrong matchgroup=Operator start=/\(\\\@<!\*\)\{2}/ end=/\(\\\@<!\*\)\{2}/ contains=@Spell,pandocNoFormattedInStrong,pandocLatexInlineMath' , ' concealends' )
270276call s: WithConceal (" block" , ' syn region pandocStrong matchgroup=Operator start=/__/ end=/__/ contains=@Spell,pandocNoFormattedInStrong,pandocLatexInlineMath' , ' concealends' )
271277" }}}
272- " Strong Emphasis: {{{2
278+ " Strong Emphasis: {{{3
273279"
274280call s: WithConceal (" block" , ' syn region pandocStrongEmphasis matchgroup=Operator start=/\*\{3}\(\S[^*]*\(\*\S\|\n[^*]*\*\S\)\)\@=/ end=/\S\@<=\*\{3}/ contains=@Spell' , ' concealends' )
275281call s: WithConceal (" block" , ' syn region pandocStrongEmphasis matchgroup=Operator start=/\(___\)\S\@=/ end=/\S\@<=___/ contains=@Spell' , ' concealends' )
276282" }}}
277- " Mixed: {{{2
283+ " Mixed: {{{3
278284call s: WithConceal (" block" , ' syn region pandocStrongInEmphasis matchgroup=Operator start=/\*\*/ end=/\*\*/ contained containedin=pandocEmphasis contains=@Spell' , ' concealends' )
279285call s: WithConceal (" block" , ' syn region pandocStrongInEmphasis matchgroup=Operator start=/__/ end=/__/ contained containedin=pandocEmphasis contains=@Spell' , ' concealends' )
280286call s: WithConceal (" block" , ' syn region pandocEmphasisInStrong matchgroup=Operator start=/\\\@1<!\(\_^\|\s\|[[:punct:]]\)\@<=\*\S\@=/ skip=/\(\*\*\|__\)/ end=/\S\@<=\*\([[:punct:]]\|\s\|\_$\)\@=/ contained containedin=pandocStrong contains=@Spell' , ' concealends' )
281287call s: WithConceal (" block" , ' syn region pandocEmphasisInStrong matchgroup=Operator start=/\\\@<!\(\_^\|\s\|[[:punct:]]\)\@<=_\S\@=/ skip=/\(\*\*\|__\)/ end=/\S\@<=_\([[:punct:]]\|\s\|\_$\)\@=/ contained containedin=pandocStrong contains=@Spell' , ' concealends' )
282288
283- " Inline Code: {{{2
289+ " Inline Code: {{{3
284290
285291" Using single back ticks
286292call 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
292298call s: WithConceal (" inlinecode" , ' syn region pandocNoFormattedInStrong matchgroup=Operator start=/\\\@<!``/ end=/\\\@<!``/ nextgroup=pandocNoFormattedAttrs contained' , ' concealends' )
293299syn match pandocNoFormattedAttrs / {.\{ -}}/ contained
294300" }}}
295- " Subscripts: {{{2
301+ " Subscripts: {{{3
296302syn region pandocSubscript start =/ \~\(\( [[:graph:]]\(\\ \)\=\)\{ -}\~\)\@ =/ end =/ \~ / keepend
297303call s: WithConceal (" subscript" , ' syn match pandocSubscriptMark /\~/ contained containedin=pandocSubscript' , ' conceal cchar=' .s: cchars [" sub" ])
298304" }}}
299- " Superscript: {{{2
305+ " Superscript: {{{3
300306syn region pandocSuperscript start =/ \^\(\( [[:graph:]]\(\\ \)\=\)\{ -}\^\)\@ =/ skip =/ \\ / end =/ \^ / keepend
301307call s: WithConceal (" superscript" , ' syn match pandocSuperscriptMark /\^/ contained containedin=pandocSuperscript' , ' conceal cchar=' .s: cchars [" super" ])
302308" }}}
303- " Strikeout: {{{2
309+ " Strikeout: {{{3
304310syn region pandocStrikeout start =/ \~\~ / end =/ \~\~ / contains =@Spell keepend
305311call s: WithConceal (" strikeout" , ' syn match pandocStrikeoutMark /\~\~/ contained containedin=pandocStrikeout' , ' conceal cchar=' .s: cchars [" strike" ])
306312" }}}
307313" }}}
308-
309- " Headers: {{{1
314+ " Headers: {{{2
310315"
311316syn match pandocAtxHeader / \(\% ^\| <.\+ >.*\n\| ^\s *\n\)\@ <=#\{ 1,6}.*\n / contains =pandocEmphasis,pandocStrong,pandocNoFormatted,pandocLaTeXInlineMath,@Spell, display
312317syn match pandocAtxHeaderMark / \( ^#\{ 1,6}\|\\\@ <!#\+\(\s *.*$\)\@ =\) / contained containedin =pandocAtxHeader
@@ -316,54 +321,41 @@ syn match pandocSetexHeader /^.\+\n[-]\+$/ contains=pandocEmphasis,pandocStrong,
316321syn match pandocHeaderAttr / {.*}/ contained containedin =pandocAtxHeader,pandocSetexHeader
317322syn match pandocHeaderID / #[-_:.[:alpha:]]*/ contained containedin =pandocHeaderAttr
318323" }}}
319-
320- " Line Blocks: {{{1
324+ " Line Blocks: {{{2
321325syn region pandocLineBlock start =/ ^|/ end =/ \( ^|\( .*\n |\@ !\)\@ =.*\)\@ <=\n /
322326syn match pandocLineBlockDelimiter / ^|/ contained containedin =pandocLineBlock
323- hi link pandocLineBlockDelimiter Delimiter
324327" }}}
328+ " Tables: {{{2
325329
326- " Tables: {{{1
327-
328- " Simple: {{{2
330+ " Simple: {{{3
329331
330332syn region pandocSimpleTable start =/ \% #=2\( ^.*[[:graph:]].*\n\)\@ <!\( ^.*[[:graph:]].*\n\)\( -\+\s *\)\+\n\n\@ !/ end =/ \n\n / containedin =ALLBUT,pandocDelimitedCodeBlock keepend
331333syn match pandocSimpleTableDelims / \- / contained containedin =pandocSimpleTable
332334syn match pandocSimpleTableHeader / \% #=2\( ^.*[[:graph:]].*\n\)\@ <!\( ^.*[[:graph:]].*\n\) / contained containedin =pandocSimpleTable
333- hi link pandocSimpleTableDelims Delimiter
334- hi link pandocSimpleTableHeader pandocStrong
335335
336336syn region pandocTable start =/ \% #=2^\( -\+\s *\)\+\n\n\@ !/ end =/ \% #=2^\( -\+\s *\)\+\n\n / containedin =ALLBUT,pandocDelimitedCodeBlock keepend
337337syn match pandocTableDelims / \- / contained containedin =pandocTable
338338syn region pandocTableMultilineHeader start =/ \% #=2\( ^-\+\n\)\@ <=./ end =/ \% #=2\n -\@ =/ contained containedin =pandocTable
339- hi link pandocTableMultilineHeader pandocStrong
340- hi link pandocTableDelims Delimiter
341339
342- " }}}2
343- " Grid: {{{2
340+ " }}}3
341+ " Grid: {{{3
344342syn region pandocGridTable start =/ \% #=2\n\@ 1<=+-/ end =/ +\n\n / containedin =ALLBUT,pandocDelimitedCodeBlock keepend
345343syn match pandocGridTableDelims / [\| =]/ contained containedin =pandocGridTable
346344syn match pandocGridTableDelims / \% #=2\( [\- +][\- +=]\@ =\| [\- +=]\@ 1<=[\- +]\) / contained containedin =pandocGridTable
347345syn 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
352348" with beginning and end pipes
353349syn region pandocPipeTable start =/ \% #=2\( [+|]\n\)\@ <!\n\@ 1<=|\( .*|\)\@ =/ end =/ |.*\n\n / containedin =ALLBUT,pandocDelimitedCodeBlock keepend
354350" without beginning and end pipes
355351syn region pandocPipeTable start =/ \% #=2^.*\n -.\{ -}|/ end =/ |.*\n\n / keepend
356352syn match pandocPipeTableDelims / [\|\- :+]/ contained containedin =pandocPipeTable
357353syn match pandocPipeTableHeader / \( ^.*\n\)\( |-\)\@ =/ contained containedin =pandocPipeTable
358354syn match pandocPipeTableHeader / \( ^.*\n\)\( -\)\@ =/ contained containedin =pandocPipeTable
359- hi link pandocPipeTableDelims Delimiter
360- hi link pandocPipeTableHeader Delimiter
361- " }}}2
355+ " }}}3
362356syn 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
367359" this is here because we can override strikeouts and subscripts
368360syn region pandocDelimitedCodeBlock start =/ ^\( >\s\)\?\z (\(\s\{ 4,}\)\=\~\{ 3,}\~ *\) / end =/ \z 1\~ */ skipnl contains =pandocDelimitedCodeBlockStart,pandocDelimitedCodeBlockEnd keepend
369361syn 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
387379 endfor
388380endif
389381" }}}
390-
391- " Abbreviations: {{{1
382+ " Abbreviations: {{{2
392383syn region pandocAbbreviationDefinition start =/ ^\*\[ .\{ -}\] :\s */ end =" $" contains =pandocNoFormatted,@Spell
393384call s: WithConceal (' abbrev' , ' syn match pandocAbbreviationSeparator /:/ contained containedin=pandocAbbreviationDefinition' , " conceal cchar=" .s: cchars [" abbrev" ])
394385syn match pandocAbbreviation / \*\[ .\{ -}\] / contained containedin =pandocAbbreviationDefinition
395386call s: WithConceal (' abbrev' , ' syn match pandocAbbreviationHead /\*\[/ contained containedin=pandocAbbreviation' , " conceal" )
396387call s: WithConceal (' abbrev' , ' syn match pandocAbbreviationTail /\]/ contained containedin=pandocAbbreviation' , " conceal" )
397388" }}}
398-
399- " Footnotes: {{{1
389+ " Footnotes: {{{2
400390" we put these here not to interfere with superscripts.
401391"
402392syn match pandocFootnoteID / \[\^ [^\] ]\+\] / nextgroup =pandocFootnoteDef
@@ -412,15 +402,13 @@ syn match pandocFootnoteID /\[\^.\{-}\]/ contained containedin=pandocFootnoteBlo
412402call s: WithConceal (" footnote" , ' syn match pandocFootnoteIDHead /\[\^/ contained containedin=pandocFootnoteID' , ' conceal cchar=' .s: cchars [" footnote" ])
413403call s: WithConceal (" footnote" , ' syn match pandocFootnoteIDTail /\]/ contained containedin=pandocFootnoteID' , ' conceal' )
414404" }}}
415-
416- " Definitions: {{{1
405+ " Definitions: {{{2
417406"
418407syn 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
419408syn match pandocDefinitionBlockTerm / ^.*\n\( ^\s *\n\) *\(\s *[:~]\)\@ =/ contained contains =pandocNoFormatted,pandocEmphasis,pandocStrong
420409call s: WithConceal (" definition" , ' syn match pandocDefinitionBlockMark /^\s*[:~]/ contained' , ' conceal cchar=' .s: cchars [" definition" ])
421410" }}}
422-
423- " List Items: {{{1
411+ " List Items: {{{2
424412"
425413" Unordered lists
426414syn 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]\=\)
435423
436424syn 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
437425" }}}
426+ " Special: {{{2
438427
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
443432" }}}
444- " Ellipses: {{{2
433+ " Ellipses: {{{3
445434if &encoding == " utf-8"
446435 call s: WithConceal (" ellipses" , ' syn match pandocEllipses /\.\.\./ display' , ' conceal cchar=…' )
447436endif
448437" }}}
449- " Quotes: {{{2
438+ " Quotes: {{{3
450439if &encoding == " utf-8"
451440 call s: WithConceal (" quotes" , ' syn match pandocBeginQuote /"\</ containedin=pandocEmphasis,pandocStrong,pandocListItem,pandocListItemContinuation,pandocUListItem display' , ' conceal cchar=“' )
452441 call s: WithConceal (" quotes" , ' syn match pandocEndQuote /\(\>[[:punct:]]*\)\@<="[[:blank:][:punct:]\n]\@=/ containedin=pandocEmphasis,pandocStrong,pandocUListItem,pandocListItem,pandocListItemContinuation display' , ' conceal cchar=”' )
453442endif
454- " Hrule: {{{2
443+ " Hrule: {{{3
455444syn match pandocHRule / \*\{ 3}$/ display
456445" }}}
457446" }}}
458-
459- " YAML: {{{1
447+ " YAML: {{{2
460448
461449try
462450 unlet ! b: current_syntax
@@ -465,6 +453,7 @@ catch /E484/
465453endtry
466454syn region pandocYAMLHeader matchgroup =Delimiter start =/ \(\% ^\|\(\s *.*\n\)\)\@ <=\-\{ 3}\s *$/ end =/ [\- |\. ]\{ 3}\s *$/ contains =@YAML containedin =TOP
467455" }}}
456+ " }}}1
468457
469458" Styling: {{{1
470459" override this for consistency
@@ -476,6 +465,9 @@ hi link pandocSetexHeader Title
476465hi link pandocHeaderAttr Comment
477466hi link pandocHeaderID Identifier
478467
468+ hi link pandocLaTexSectionCmd texSection
469+ hi link pandocLaTeXDelimiter texDelimiter
470+
479471hi link pandocHTMLComment Comment
480472hi link pandocHTMLCommentStart Delimiter
481473hi link pandocHTMLCommentEnd Delimiter
@@ -497,6 +489,9 @@ hi link pandocDelimitedCodeBlockEnd Delimiter
497489hi link pandocDelimitedCodeBlockLanguage Comment
498490hi link pandocBlockQuoteinDelimitedCodeBlock pandocBlockQuote
499491hi link pandocCodePre String
492+
493+ hi link pandocLineBlockDelimiter Delimiter
494+
500495hi link pandocListItemBullet Operator
501496hi link pandocUListItemBullet Operator
502497hi link pandocListItemBulletId Identifier
@@ -516,6 +511,16 @@ hi link pandocAutomaticLink Underlined
516511hi link pandocDefinitionBlockTerm Identifier
517512hi link pandocDefinitionBlockMark Operator
518513
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+
519524hi link pandocAbbreviationHead Type
520525hi link pandocAbbreviation Label
521526hi link pandocAbbreviationTail Type
@@ -577,9 +582,3 @@ let b:current_syntax = "pandoc"
577582
578583syntax sync clear
579584syntax 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