blob: a94609b32526651d164721b21dfe6e41c3ab4b9f [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim syntax file
2" Language: TAK2, TAK3, TAK2000 thermal modeling compare file
3" Maintainer: Adrian Nagle, anagle@ball.com
4" Last Change: 2003 May 11
5" Filenames: *.cmp
6" URL: http://www.naglenet.org/vim/syntax/takcmp.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
13if version < 600
14 syntax clear
15elseif exists("b:current_syntax")
16 finish
17endif
18
19
20
21" Ignore case
22syn case ignore
23
24
25
26"
27"
28" Begin syntax definitions for compare files.
29"
30" Define keywords for TAK compare
31 syn keyword takcmpUnit celsius fahrenheit
32
33
34
35" Define matches for TAK compare
36 syn match takcmpTitle "Steady State Temperature Comparison"
37
38 syn match takcmpLabel "Run Date:"
39 syn match takcmpLabel "Run Time:"
40 syn match takcmpLabel "Temp. File \d Units:"
41 syn match takcmpLabel "Filename:"
42 syn match takcmpLabel "Output Units:"
43
44 syn match takcmpHeader "^ *Node\( *File \d\)* *Node Description"
45
46 syn match takcmpDate "\d\d\/\d\d\/\d\d"
47 syn match takcmpTime "\d\d:\d\d:\d\d"
48 syn match takcmpInteger "^ *-\=\<[0-9]*\>"
49 syn match takcmpFloat "-\=\<[0-9]*\.[0-9]*"
50
51
52
53" Define the default highlighting
54" For version 5.7 and earlier: only when not done already
55" For version 5.8 and later: only when an item doesn't have highlighting yet
56if version >= 508 || !exists("did_takcmp_syntax_inits")
57 if version < 508
58 let did_takcmp_syntax_inits = 1
59 command -nargs=+ HiLink hi link <args>
60 else
61 command -nargs=+ HiLink hi def link <args>
62 endif
63
64 HiLink takcmpTitle Type
65 HiLink takcmpUnit PreProc
66
67 HiLink takcmpLabel Statement
68
69 HiLink takcmpHeader takHeader
70
71 HiLink takcmpDate Identifier
72 HiLink takcmpTime Identifier
73 HiLink takcmpInteger Number
74 HiLink takcmpFloat Special
75
76 delcommand HiLink
77endif
78
79
80let b:current_syntax = "takcmp"
81
82" vim: ts=8 sw=2