Mercurial > hg > RemoteEditor > vim7
comparison runtime/syntax/tak.vim @ 0:76efa0be13f1
Initial revision
author | atsuki |
---|---|
date | Sat, 10 Nov 2007 15:07:22 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:76efa0be13f1 |
---|---|
1 " Vim syntax file | |
2 " Language: TAK2, TAK3, TAK2000 thermal modeling input file | |
3 " Maintainer: Adrian Nagle, anagle@ball.com | |
4 " Last Change: 2003 May 11 | |
5 " Filenames: *.tak | |
6 " URL: http://www.naglenet.org/vim/syntax/tak.vim | |
7 " MAIN URL: http://www.naglenet.org/vim/ | |
8 | |
9 | |
10 | |
11 " For version 5.x: Clear all syntax items | |
12 " For version 6.x: Quit when a syntax file was already loaded | |
13 if version < 600 | |
14 syntax clear | |
15 elseif exists("b:current_syntax") | |
16 finish | |
17 endif | |
18 | |
19 | |
20 | |
21 " Ignore case | |
22 syn case ignore | |
23 | |
24 | |
25 | |
26 " | |
27 " | |
28 " Begin syntax definitions for tak input file. | |
29 " | |
30 | |
31 " Force free-form fortran format | |
32 let fortran_free_source=1 | |
33 | |
34 " Load FORTRAN syntax file | |
35 if version < 600 | |
36 source <sfile>:p:h/fortran.vim | |
37 else | |
38 runtime! syntax/fortran.vim | |
39 endif | |
40 unlet b:current_syntax | |
41 | |
42 | |
43 | |
44 " Define keywords for TAK and TAKOUT | |
45 syn keyword takOptions AUTODAMP CPRINT CSGDUMP GPRINT HPRINT LODTMP | |
46 syn keyword takOptions LOGIC LPRINT NCVPRINT PLOTQ QPRINT QDUMP | |
47 syn keyword takOptions SUMMARY SOLRTN UID DICTIONARIES | |
48 | |
49 syn keyword takRoutine SSITER FWDWRD FWDBCK BCKWRD | |
50 | |
51 syn keyword takControl ABSZRO BACKUP DAMP DTIMEI DTIMEL DTIMEH IFC | |
52 syn keyword takControl MAXTEMP NLOOPS NLOOPT NODELIST OUTPUT PLOT | |
53 syn keyword takControl SCALE SIGMA SSCRIT TIMEND TIMEN TIMEO TRCRIT | |
54 syn keyword takControl PLOT | |
55 | |
56 syn keyword takSolids PLATE CYL | |
57 syn keyword takSolidsArg ID MATNAM NTYPE TEMP XL YL ZL ISTRN ISTRG NNX | |
58 syn keyword takSolidsArg NNY NNZ INCX INCY INCZ IAK IAC DIFF ARITH BOUN | |
59 syn keyword takSolidsArg RMIN RMAX AXMAX NNR NNTHETA INCR INCTHETA END | |
60 | |
61 syn case ignore | |
62 | |
63 syn keyword takMacro fac pstart pstop | |
64 syn keyword takMacro takcommon fstart fstop | |
65 | |
66 syn keyword takIdentifier flq flx gen ncv per sim siv stf stv tvd tvs | |
67 syn keyword takIdentifier tvt pro thm | |
68 | |
69 | |
70 | |
71 " Define matches for TAK | |
72 syn match takFortran "^F[0-9 ]"me=e-1 | |
73 syn match takMotran "^M[0-9 ]"me=e-1 | |
74 | |
75 syn match takComment "^C.*$" | |
76 syn match takComment "^R.*$" | |
77 syn match takComment "\$.*$" | |
78 | |
79 syn match takHeader "^header[^,]*" | |
80 | |
81 syn match takIncludeFile "include \+[^ ]\+"hs=s+8 contains=fortranInclude | |
82 | |
83 syn match takInteger "-\=\<[0-9]*\>" | |
84 syn match takFloat "-\=\<[0-9]*\.[0-9]*" | |
85 syn match takScientific "-\=\<[0-9]*\.[0-9]*E[-+]\=[0-9]\+\>" | |
86 | |
87 syn match takEndData "END OF DATA" | |
88 | |
89 if exists("thermal_todo") | |
90 execute 'syn match takTodo ' . '"^'.thermal_todo.'.*$"' | |
91 else | |
92 syn match takTodo "^?.*$" | |
93 endif | |
94 | |
95 | |
96 | |
97 " Define the default highlighting | |
98 " For version 5.7 and earlier: only when not done already | |
99 " For version 5.8 and later: only when an item doesn't have highlighting yet | |
100 if version >= 508 || !exists("did_tak_syntax_inits") | |
101 if version < 508 | |
102 let did_tak_syntax_inits = 1 | |
103 command -nargs=+ HiLink hi link <args> | |
104 else | |
105 command -nargs=+ HiLink hi def link <args> | |
106 endif | |
107 | |
108 HiLink takMacro Macro | |
109 HiLink takOptions Special | |
110 HiLink takRoutine Type | |
111 HiLink takControl Special | |
112 HiLink takSolids Special | |
113 HiLink takSolidsArg Statement | |
114 HiLink takIdentifier Identifier | |
115 | |
116 HiLink takFortran PreProc | |
117 HiLink takMotran PreProc | |
118 | |
119 HiLink takComment Comment | |
120 HiLink takHeader Typedef | |
121 HiLink takIncludeFile Type | |
122 HiLink takInteger Number | |
123 HiLink takFloat Float | |
124 HiLink takScientific Float | |
125 | |
126 HiLink takEndData Macro | |
127 | |
128 HiLink takTodo Todo | |
129 | |
130 delcommand HiLink | |
131 endif | |
132 | |
133 | |
134 let b:current_syntax = "tak" | |
135 | |
136 " vim: ts=8 sw=2 |