CAT-SOOP is a flexible, programmable learning management system based on the Python programming language. https://catsoop.mit.edu
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

26 lines
955 B

  1. " syntax highlighting for catsoop files
  2. " based on https://stackoverflow.com/questions/5176972/trouble-using-vims-syn-include-and-syn-region-to-embed-syntax-highlighting
  3. let b:current_syntax=''
  4. unlet b:current_syntax
  5. runtime! syntax/markdown.vim
  6. let b:current_syntax=''
  7. unlet b:current_syntax
  8. syntax include @Markdown syntax/markdown.vim
  9. let b:current_syntax=''
  10. unlet b:current_syntax
  11. syntax include @Python syntax/python.vim
  12. syntax region pythonCode matchgroup=pythonTag start="<python>" end="</python>" containedin=@Markdown contains=@Python
  13. syntax region pythonCodeQuestion matchgroup=questionTag start="<question [^>]*>" end="</question>" containedin=@Markdown contains=@Python
  14. let b:current_syntax=''
  15. unlet b:current_syntax
  16. syntax include @TeX syntax/tex.vim
  17. syntax region latexDisplayMath start="\$\$" end="\$\$" keepend containedin=@Markdown contains=@TeX
  18. hi link pythonTag htmlTag
  19. hi link questionTag htmlTag
  20. let b:current_syntax = 'catsoop'