grads.vim (1742B)
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 10 " quit when a syntax file was already loaded 11 if exists("b:current_syntax") 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. 53 " Only when an item doesn't hgs highlighting+yet 54 55 hi def link gradsStatement Statement 56 57 hi def link gradsString String 58 hi def link gradsNumber Number 59 60 hi def link gradsFixVariables Special 61 hi def link gradsVariables Identifier 62 hi def link gradsglobalVariables Special 63 hi def link gradsConst Special 64 65 hi def link gradsClassMethods Function 66 67 hi def link gradsOperator Operator 68 hi def link gradsComment Comment 69 70 hi def link gradsTypos Error 71 72 73 let b:current_syntax = "grads"