uil.vim 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. " Vim syntax file
  2. " Language: Motif UIL (User Interface Language)
  3. " Maintainer: Thomas Koehler <jean-luc@picard.franken.de>
  4. " Please be aware: I'm often slow to answer email due to a high
  5. " non-computer related workload (sometimes 4-8 weeks)
  6. " Last Change: 2016 September 6
  7. " URL: http://gott-gehabt.de/800_wer_wir_sind/thomas/Homepage/Computer/vim/syntax/uil.vim
  8. " quit when a syntax file was already loaded
  9. if exists("b:current_syntax")
  10. finish
  11. endif
  12. " A bunch of useful keywords
  13. syn keyword uilType arguments callbacks color
  14. syn keyword uilType compound_string controls end
  15. syn keyword uilType exported file include
  16. syn keyword uilType module object procedure
  17. syn keyword uilType user_defined xbitmapfile
  18. syn keyword uilTodo contained TODO
  19. " String and Character constants
  20. " Highlight special characters (those which have a backslash) differently
  21. syn match uilSpecial contained "\\\d\d\d\|\\."
  22. syn region uilString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell,uilSpecial
  23. syn match uilCharacter "'[^\\]'"
  24. syn region uilString start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@Spell,uilSpecial
  25. syn match uilSpecialCharacter "'\\.'"
  26. syn match uilSpecialStatement "Xm[^ =(){}:;]*"
  27. syn match uilSpecialFunction "MrmNcreateCallback"
  28. syn match uilRessource "XmN[^ =(){}:;]*"
  29. syn match uilNumber "-\=\<\d*\.\=\d\+\(e\=f\=\|[uU]\=[lL]\=\)\>"
  30. syn match uilNumber "0[xX]\x\+\>"
  31. syn region uilComment start="/\*" end="\*/" contains=@Spell,uilTodo
  32. syn match uilComment "!.*" contains=@Spell,uilTodo
  33. syn match uilCommentError "\*/"
  34. syn region uilPreCondit start="^#\s*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=uilComment,uilString,uilCharacter,uilNumber,uilCommentError
  35. syn match uilIncluded contained "<[^>]*>"
  36. syn match uilInclude "^#\s*include\s\+." contains=uilString,uilIncluded
  37. syn match uilLineSkip "\\$"
  38. syn region uilDefine start="^#\s*\(define\>\|undef\>\)" end="$" contains=uilLineSkip,uilComment,uilString,uilCharacter,uilNumber,uilCommentError
  39. syn sync ccomment uilComment
  40. " Define the default highlighting.
  41. " Only when an item doesn't have highlighting yet
  42. " The default highlighting.
  43. hi def link uilCharacter uilString
  44. hi def link uilSpecialCharacter uilSpecial
  45. hi def link uilNumber uilString
  46. hi def link uilCommentError uilError
  47. hi def link uilInclude uilPreCondit
  48. hi def link uilDefine uilPreCondit
  49. hi def link uilIncluded uilString
  50. hi def link uilSpecialFunction uilRessource
  51. hi def link uilRessource Identifier
  52. hi def link uilSpecialStatement Keyword
  53. hi def link uilError Error
  54. hi def link uilPreCondit PreCondit
  55. hi def link uilType Type
  56. hi def link uilString String
  57. hi def link uilComment Comment
  58. hi def link uilSpecial Special
  59. hi def link uilTodo Todo
  60. let b:current_syntax = "uil"
  61. " vim: ts=8