7
|
1 " Vim syntax file
|
|
2 " Language: Model
|
|
3 " Maintainer: Bram Moolenaar <Bram@vim.org>
|
|
4 " Last Change: 2001 Apr 25
|
|
5
|
|
6 " very basic things only (based on the vgrindefs file).
|
|
7 " If you use this language, please improve it, and send me the patches!
|
|
8
|
|
9 " For version 5.x: Clear all syntax items
|
|
10 " For version 6.x: Quit when a syntax file was already loaded
|
|
11 if version < 600
|
|
12 syntax clear
|
|
13 elseif exists("b:current_syntax")
|
|
14 finish
|
|
15 endif
|
|
16
|
|
17 " A bunch of keywords
|
|
18 syn keyword modelKeyword abs and array boolean by case cdnl char copied dispose
|
|
19 syn keyword modelKeyword div do dynamic else elsif end entry external FALSE false
|
|
20 syn keyword modelKeyword fi file for formal fortran global if iff ift in integer include
|
|
21 syn keyword modelKeyword inline is lbnd max min mod new NIL nil noresult not notin od of
|
|
22 syn keyword modelKeyword or procedure public read readln readonly record recursive rem rep
|
|
23 syn keyword modelKeyword repeat res result return set space string subscript such then TRUE
|
|
24 syn keyword modelKeyword true type ubnd union until varies while width
|
|
25
|
|
26 " Special keywords
|
|
27 syn keyword modelBlock beginproc endproc
|
|
28
|
|
29 " Comments
|
|
30 syn region modelComment start="\$" end="\$" end="$"
|
|
31
|
|
32 " Strings
|
|
33 syn region modelString start=+"+ end=+"+
|
|
34
|
|
35 " Character constant (is this right?)
|
|
36 syn match modelString "'."
|
|
37
|
|
38 " Define the default highlighting.
|
|
39 " For version 5.7 and earlier: only when not done already
|
|
40 " For version 5.8 and later: only when an item doesn't have highlighting yet
|
|
41 if version >= 508 || !exists("did_model_syntax_inits")
|
|
42 if version < 508
|
|
43 let did_model_syntax_inits = 1
|
|
44 command -nargs=+ HiLink hi link <args>
|
|
45 else
|
|
46 command -nargs=+ HiLink hi def link <args>
|
|
47 endif
|
|
48
|
|
49 HiLink modelKeyword Statement
|
|
50 HiLink modelBlock PreProc
|
|
51 HiLink modelComment Comment
|
|
52 HiLink modelString String
|
|
53
|
|
54 delcommand HiLink
|
|
55 endif
|
|
56
|
|
57 let b:current_syntax = "model"
|
|
58
|
|
59 " vim: ts=8 sw=2
|