annotate runtime/syntax/ave.vim @ 49:000769ce6c9d default tip

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