annotate runtime/syntax/grads.vim @ 18535:669d5689143b

Added tag v8.1.2261 for changeset 7dd83b5325e974ec37941d8796ba708212aca891
author Bram Moolenaar <Bram@vim.org>
date Wed, 06 Nov 2019 14:00:04 +0100
parents 46763b01cd9a
children
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
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
10 " quit when a syntax file was already loaded
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
11 if exists("b:current_syntax")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 " GrADS is entirely case-insensitive.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 " The keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn keyword gradsStatement if else endif break exit return
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn keyword gradsStatement while endwhile say prompt pull function
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn keyword gradsStatement subwrd sublin substr read write close
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 " String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn region gradsString start=+'+ end=+'+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 " Integer number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn match gradsNumber "[+-]\=\<[0-9]\+\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 " Operator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 "syn keyword gradsOperator | ! % & != >=
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 "syn match gradsOperator "[^\.]not[^a-zA-Z]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 " Variables
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn keyword gradsFixVariables lat lon lev result rec rc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn match gradsglobalVariables "_[a-zA-Z][a-zA-Z0-9]*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn match gradsVariables "[a-zA-Z][a-zA-Z0-9]*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn match gradsConst "#[A-Z][A-Z_]+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 " Comments
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn match gradsComment "\*.*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 " Typical Typos
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 " for C programmers:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 " syn match gradsTypos "=="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 " syn match gradsTypos "!="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 " Define the default highlighting.
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
53 " Only when an item doesn't hgs highlighting+yet
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
54
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
55 hi def link gradsStatement Statement
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
57 hi def link gradsString String
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
58 hi def link gradsNumber Number
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
60 hi def link gradsFixVariables Special
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
61 hi def link gradsVariables Identifier
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
62 hi def link gradsglobalVariables Special
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
63 hi def link gradsConst Special
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
65 hi def link gradsClassMethods Function
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
67 hi def link gradsOperator Operator
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
68 hi def link gradsComment Comment
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
70 hi def link gradsTypos Error
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
71
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 let b:current_syntax = "grads"