/runtime/syntax/ave.vim

https://bitbucket.org/wolever/vim72-logging · Vim Script · 92 lines · 40 code · 25 blank · 27 comment · 7 complexity · 0830bf2d8b330b562bd0356e3abeb4c8 MD5 · raw file

  1. " Vim syntax file
  2. " Copyright by Jan-Oliver Wagner
  3. " Language: avenue
  4. " Maintainer: Jan-Oliver Wagner <Jan-Oliver.Wagner@intevation.de>
  5. " Last change: 2001 May 10
  6. " Avenue is the ArcView built-in language. ArcView is
  7. " a desktop GIS by ESRI. Though it is a built-in language
  8. " and a built-in editor is provided, the use of VIM increases
  9. " development speed.
  10. " I use some technologies to automatically load avenue scripts
  11. " into ArcView.
  12. " For version 5.x: Clear all syntax items
  13. " For version 6.x: Quit when a syntax file was already loaded
  14. if version < 600
  15. syntax clear
  16. elseif exists("b:current_syntax")
  17. finish
  18. endif
  19. " Avenue is entirely case-insensitive.
  20. syn case ignore
  21. " The keywords
  22. syn keyword aveStatement if then elseif else end break exit return
  23. syn keyword aveStatement for each in continue while
  24. " String
  25. syn region aveString start=+"+ end=+"+
  26. " Integer number
  27. syn match aveNumber "[+-]\=\<[0-9]\+\>"
  28. " Operator
  29. syn keyword aveOperator or and max min xor mod by
  30. " 'not' is a kind of a problem: Its an Operator as well as a method
  31. " 'not' is only marked as an Operator if not applied as method
  32. syn match aveOperator "[^\.]not[^a-zA-Z]"
  33. " Variables
  34. syn keyword aveFixVariables av nil self false true nl tab cr tab
  35. syn match globalVariables "_[a-zA-Z][a-zA-Z0-9]*"
  36. syn match aveVariables "[a-zA-Z][a-zA-Z0-9_]*"
  37. syn match aveConst "#[A-Z][A-Z_]+"
  38. " Comments
  39. syn match aveComment "'.*"
  40. " Typical Typos
  41. " for C programmers:
  42. syn match aveTypos "=="
  43. syn match aveTypos "!="
  44. " Define the default highlighting.
  45. " For version 5.7 and earlier: only when not done already
  46. " For version 5.8 and later: only when an item doesn't have highlighting+yet
  47. if version >= 508 || !exists("did_ave_syn_inits")
  48. if version < 508
  49. let did_ave_syn_inits = 1
  50. command -nargs=+ HiLink hi link <args>
  51. else
  52. command -nargs=+ HiLink hi def link <args>
  53. endif
  54. HiLink aveStatement Statement
  55. HiLink aveString String
  56. HiLink aveNumber Number
  57. HiLink aveFixVariables Special
  58. HiLink aveVariables Identifier
  59. HiLink globalVariables Special
  60. HiLink aveConst Special
  61. HiLink aveClassMethods Function
  62. HiLink aveOperator Operator
  63. HiLink aveComment Comment
  64. HiLink aveTypos Error
  65. delcommand HiLink
  66. endif
  67. let b:current_syntax = "ave"