Mercurial > vim
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 |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: grads (GrADS scripts) | |
3 " Maintainer: Stefan Fronzek (sfronzek at gmx dot net) | |
4 " Last change: 13 Feb 2004 | |
5 | |
6 " Grid Analysis and Display System (GrADS); http://grads.iges.org/grads | |
7 " This syntax file defines highlighting for only very few features of | |
8 " the GrADS scripting language. | |
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 | 12 finish |
13 endif | |
14 | |
15 " GrADS is entirely case-insensitive. | |
16 syn case ignore | |
17 | |
18 " The keywords | |
19 | |
20 syn keyword gradsStatement if else endif break exit return | |
21 syn keyword gradsStatement while endwhile say prompt pull function | |
22 syn keyword gradsStatement subwrd sublin substr read write close | |
23 " String | |
24 | |
25 syn region gradsString start=+'+ end=+'+ | |
26 | |
27 " Integer number | |
28 syn match gradsNumber "[+-]\=\<[0-9]\+\>" | |
29 | |
30 " Operator | |
31 | |
32 "syn keyword gradsOperator | ! % & != >= | |
33 "syn match gradsOperator "[^\.]not[^a-zA-Z]" | |
34 | |
35 " Variables | |
36 | |
37 syn keyword gradsFixVariables lat lon lev result rec rc | |
38 syn match gradsglobalVariables "_[a-zA-Z][a-zA-Z0-9]*" | |
39 syn match gradsVariables "[a-zA-Z][a-zA-Z0-9]*" | |
40 syn match gradsConst "#[A-Z][A-Z_]+" | |
41 | |
42 " Comments | |
43 | |
44 syn match gradsComment "\*.*" | |
45 | |
46 " Typical Typos | |
47 | |
48 " for C programmers: | |
49 " syn match gradsTypos "==" | |
50 " syn match gradsTypos "!=" | |
51 | |
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 | 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 | 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 | 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 | 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 | 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 | 72 |
73 let b:current_syntax = "grads" |