pism.vim 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. "For autoload, add this to your VIM config:
  2. " VIM: .vimrc
  3. " NeoVIM: .config/nvim/init.vim
  4. "
  5. "autocmd BufRead *.pism call SetPismOptions()
  6. "function SetPismOptions()
  7. " set syntax=pism
  8. " source /home/narodnik/src/sapvi/scripts/pism.vim
  9. "endfunction
  10. if exists('b:current_syntax')
  11. finish
  12. endif
  13. syn keyword sapviKeyword constant contract start end
  14. "syn keyword sapviAttr
  15. syn keyword sapviType FixedGenerator BlakePersonalization PedersenPersonalization ByteSize U64 Fr Point Bool Scalar BinarySize
  16. syn match sapviFunction "^[ ]*[a-z_0-9]* "
  17. syn match sapviComment "#.*$"
  18. syn match sapviNumber ' \zs\d\+\ze'
  19. syn match sapviConst '[A-Z_]\{2,}[A-Z0-9_]*'
  20. syn keyword sapviBoolVal true false
  21. syn match sapviPreproc "{%.*%}"
  22. syn match sapviPreproc2 "{{.*}}"
  23. hi def link sapviKeyword Statement
  24. "hi def link sapviAttr StorageClass
  25. hi def link sapviPreproc PreProc
  26. hi def link sapviPreproc2 PreProc
  27. hi def link sapviType Type
  28. hi def link sapviFunction Function
  29. hi def link sapviComment Comment
  30. hi def link sapviNumber Constant
  31. hi def link sapviConst Constant
  32. hi def link sapviBoolVal Constant
  33. let b:current_syntax = "pism"