mgp.vim 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. " Vim syntax file
  2. " Language: mgp - MaGic Point
  3. " Maintainer: Gerfried Fuchs <alfie@ist.org>
  4. " Filenames: *.mgp
  5. " Last Change: 25 Apr 2001
  6. " URL: http://alfie.ist.org/vim/syntax/mgp.vim
  7. "
  8. " Comments are very welcome - but please make sure that you are commenting on
  9. " the latest version of this file.
  10. " SPAM is _NOT_ welcome - be ready to be reported!
  11. " quit when a syntax file was already loaded
  12. if exists("b:current_syntax")
  13. finish
  14. endif
  15. syn match mgpLineSkip "\\$"
  16. " all the commands that are currently recognized
  17. syn keyword mgpCommand contained size fore back bgrad left leftfill center
  18. syn keyword mgpCommand contained right shrink lcutin rcutin cont xfont vfont
  19. syn keyword mgpCommand contained tfont tmfont tfont0 bar image newimage
  20. syn keyword mgpCommand contained prefix icon bimage default tab vgap hgap
  21. syn keyword mgpCommand contained pause mark again system filter endfilter
  22. syn keyword mgpCommand contained vfcap tfdir deffont font embed endembed
  23. syn keyword mgpCommand contained noop pcache include
  24. " charset is not yet supported :-)
  25. " syn keyword mgpCommand contained charset
  26. syn region mgpFile contained start=+"+ skip=+\\\\\|\\"+ end=+"+
  27. syn match mgpValue contained "\d\+"
  28. syn match mgpSize contained "\d\+x\d\+"
  29. syn match mgpLine +^%.*$+ contains=mgpCommand,mgpFile,mgpSize,mgpValue
  30. " Comments
  31. syn match mgpPercent +^%%.*$+
  32. syn match mgpHash +^#.*$+
  33. " these only work alone
  34. syn match mgpPage +^%page$+
  35. syn match mgpNoDefault +^%nodefault$+
  36. " Define the default highlighting.
  37. " Only when an item doesn't have highlighting yet
  38. hi def link mgpLineSkip Special
  39. hi def link mgpHash mgpComment
  40. hi def link mgpPercent mgpComment
  41. hi def link mgpComment Comment
  42. hi def link mgpCommand Identifier
  43. hi def link mgpLine Type
  44. hi def link mgpFile String
  45. hi def link mgpSize Number
  46. hi def link mgpValue Number
  47. hi def link mgpPage mgpDefine
  48. hi def link mgpNoDefault mgpDefine
  49. hi def link mgpDefine Define
  50. let b:current_syntax = "mgp"