annotate runtime/syntax/grads.vim @ 3070:880b7dd69331 v7.3.307

updated for version 7.3.307 Problem: Python 3 doesn't support slice assignment. Solution: Implement slices. (Brett Overesch, Roland Puntaier)
author Bram Moolenaar <bram@vim.org>
date Wed, 14 Sep 2011 15:01:58 +0200
parents 3fc0f57ecb91
children 43efa4f5a8ea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: grads (GrADS scripts)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Stefan Fronzek (sfronzek at gmx dot net)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Last change: 13 Feb 2004
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " Grid Analysis and Display System (GrADS); http://grads.iges.org/grads
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " This syntax file defines highlighting for only very few features of
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " the GrADS scripting language.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 " GrADS is entirely case-insensitive.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 " The keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn keyword gradsStatement if else endif break exit return
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn keyword gradsStatement while endwhile say prompt pull function
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn keyword gradsStatement subwrd sublin substr read write close
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 " String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn region gradsString start=+'+ end=+'+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 " Integer number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn match gradsNumber "[+-]\=\<[0-9]\+\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 " Operator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 "syn keyword gradsOperator | ! % & != >=
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 "syn match gradsOperator "[^\.]not[^a-zA-Z]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 " Variables
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn keyword gradsFixVariables lat lon lev result rec rc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn match gradsglobalVariables "_[a-zA-Z][a-zA-Z0-9]*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn match gradsVariables "[a-zA-Z][a-zA-Z0-9]*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn match gradsConst "#[A-Z][A-Z_]+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 " Comments
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn match gradsComment "\*.*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 " Typical Typos
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 " for C programmers:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 " syn match gradsTypos "=="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 " syn match gradsTypos "!="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 " For version 5.8 and later: only when an item doesn't hgs highlighting+yet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 if version >= 508 || !exists("did_gs_syn_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 let did_gs_syn_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 HiLink gradsStatement Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 HiLink gradsString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 HiLink gradsNumber Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 HiLink gradsFixVariables Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 HiLink gradsVariables Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 HiLink gradsglobalVariables Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 HiLink gradsConst Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 HiLink gradsClassMethods Function
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 HiLink gradsOperator Operator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 HiLink gradsComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 HiLink gradsTypos Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 let b:current_syntax = "grads"