Browse Source

vim syntax highlighting: support for @{...} python and for <comment> tags

tags/v2019.9.0
adam j hartz 3 months ago
parent
commit
504eb1b1d8
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      vim/syntax/catsoop.vim

+ 4
- 0
vim/syntax/catsoop.vim View File

@@ -14,12 +14,16 @@ unlet b:current_syntax
syntax include @Python syntax/python.vim
syntax region pythonCode matchgroup=pythonTag start="<python>" end="</python>" containedin=@Markdown contains=@Python
syntax region pythonCodeQuestion matchgroup=questionTag start="<question [^>]*>" end="</question>" containedin=@Markdown contains=@Python
syntax region pythonShort start="@{" end="}" containedin=@Markdown contains=@Python

let b:current_syntax=''
unlet b:current_syntax
syntax include @TeX syntax/tex.vim
syntax region latexDisplayMath start="\$\$" end="\$\$" keepend containedin=@Markdown contains=@TeX

syntax region catsoopComment start="<comment>" end="</comment>"

hi link catsoopComment Comment
hi link pythonTag htmlTag
hi link questionTag htmlTag
let b:current_syntax = 'catsoop'

Loading…
Cancel
Save