瀏覽代碼

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

tags/v2019.9.0
adam j hartz 11 月之前
父節點
當前提交
504eb1b1d8
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. +4
    -0
      vim/syntax/catsoop.vim

+ 4
- 0
vim/syntax/catsoop.vim 查看文件

@@ -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…
取消
儲存