forked from vim-pandoc/vim-rmarkdown
-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathquarto.vim
More file actions
27 lines (22 loc) · 1.31 KB
/
quarto.vim
File metadata and controls
27 lines (22 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
runtime syntax/pandoc.vim
PandocHighlight r
" quarto recognizes embedded R differently than regular pandoc
exe 'syn region pandocRChunk '.
\'start=/\(```\s*{\s*r.*\n\)\@<=\_^/ ' .
\'end=/\_$\n\(\(\s\{4,}\)\=\(`\{3,}`*\|\~\{3,}\~*\)\_$\n\_$\)\@=/ '.
\'contained containedin=pandocDelimitedCodeblock contains=@R'
syn region pandocInlineR matchgroup=Operator start=/`r\s/ end=/`/ contains=@R concealends
PandocHighlight python
" quarto recognizes embedded Python differently than regular pandoc
exe 'syn region pandocPythonChunk '.
\'start=/\(```\s*{\s*python.*\n\)\@<=\_^/ ' .
\'end=/\_$\n\(\(\s\{4,}\)\=\(`\{3,}`*\|\~\{3,}\~*\)\_$\n\_$\)\@=/ '.
\'contained containedin=pandocDelimitedCodeblock contains=@python'
syn region pandocInlinePython matchgroup=Operator start=/`python\s/ end=/`/ contains=@Python concealends
PandocHighlight julia
" quarto recognizes embedded Julia differently than regular pandoc
exe 'syn region pandocJuliaChunk '.
\'start=/\(```\s*{\s*julia.*\n\)\@<=\_^/ ' .
\'end=/\_$\n\(\(\s\{4,}\)\=\(`\{3,}`*\|\~\{3,}\~*\)\_$\n\_$\)\@=/ '.
\'contained containedin=pandocDelimitedCodeblock contains=@julia'
syn region pandocInlineJulia matchgroup=Operator start=/`julia\s/ end=/`/ contains=@Julia concealends