blob: ae369393646b0d1f63bb0e25b23a7f80e6ac26f6 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" 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
7" Avenue is the ArcView built-in language. ArcView is
8" a desktop GIS by ESRI. Though it is a built-in language
9" and a built-in editor is provided, the use of VIM increases
10" development speed.
11" I use some technologies to automatically load avenue scripts
12" into ArcView.
13
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020014" quit when a syntax file was already loaded
15if exists("b:current_syntax")
Bram Moolenaar071d4272004-06-13 20:20:40 +000016 finish
17endif
18
19" Avenue is entirely case-insensitive.
20syn case ignore
21
22" The keywords
23
24syn keyword aveStatement if then elseif else end break exit return
25syn keyword aveStatement for each in continue while
26
27" String
28
29syn region aveString start=+"+ end=+"+
30
31" Integer number
32syn match aveNumber "[+-]\=\<[0-9]\+\>"
33
34" Operator
35
36syn keyword aveOperator or and max min xor mod by
37" 'not' is a kind of a problem: Its an Operator as well as a method
38" 'not' is only marked as an Operator if not applied as method
39syn match aveOperator "[^\.]not[^a-zA-Z]"
40
41" Variables
42
43syn keyword aveFixVariables av nil self false true nl tab cr tab
44syn match globalVariables "_[a-zA-Z][a-zA-Z0-9]*"
45syn match aveVariables "[a-zA-Z][a-zA-Z0-9_]*"
46syn match aveConst "#[A-Z][A-Z_]+"
47
48" Comments
49
50syn match aveComment "'.*"
51
52" Typical Typos
53
54" for C programmers:
55syn match aveTypos "=="
56syn match aveTypos "!="
57
58" Define the default highlighting.
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020059" Only when an item doesn't have highlighting+yet
60command -nargs=+ HiLink hi def link <args>
Bram Moolenaar071d4272004-06-13 20:20:40 +000061
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020062HiLink aveStatement Statement
Bram Moolenaar071d4272004-06-13 20:20:40 +000063
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020064HiLink aveString String
65HiLink aveNumber Number
Bram Moolenaar071d4272004-06-13 20:20:40 +000066
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020067HiLink aveFixVariables Special
68HiLink aveVariables Identifier
69HiLink globalVariables Special
70HiLink aveConst Special
Bram Moolenaar071d4272004-06-13 20:20:40 +000071
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020072HiLink aveClassMethods Function
Bram Moolenaar071d4272004-06-13 20:20:40 +000073
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020074HiLink aveOperator Operator
75HiLink aveComment Comment
Bram Moolenaar071d4272004-06-13 20:20:40 +000076
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020077HiLink aveTypos Error
Bram Moolenaar071d4272004-06-13 20:20:40 +000078
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020079delcommand HiLink
Bram Moolenaar071d4272004-06-13 20:20:40 +000080
81let b:current_syntax = "ave"