1" Vim syntax file 2" Language: TSS (Thermal Synthesizer System) Optics 3" Maintainer: Adrian Nagle, [email protected] 4" Last Change: 2003 May 11 5" Filenames: *.tssop 6" URL: http://www.naglenet.org/vim/syntax/tssop.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 tss optics file. 29" 30 31" Define keywords for TSS 32syn keyword tssopParam ir_eps ir_trans ir_spec ir_tspec ir_refract 33syn keyword tssopParam sol_eps sol_trans sol_spec sol_tspec sol_refract 34syn keyword tssopParam color 35 36"syn keyword tssopProp property 37 38syn keyword tssopArgs white red blue green yellow orange violet pink 39syn keyword tssopArgs turquoise grey black 40 41 42 43" Define matches for TSS 44syn match tssopComment /comment \+= \+".*"/ contains=tssopParam,tssopCommentString 45syn match tssopCommentString /".*"/ contained 46 47syn match tssopProp "property " 48syn match tssopProp "edit/optic " 49syn match tssopPropName "^property \S\+" contains=tssopProp 50syn match tssopPropName "^edit/optic \S\+$" contains=tssopProp 51 52syn match tssopInteger "-\=\<[0-9]*\>" 53syn match tssopFloat "-\=\<[0-9]*\.[0-9]*" 54syn match tssopScientific "-\=\<[0-9]*\.[0-9]*E[-+]\=[0-9]\+\>" 55 56 57 58" Define the default highlighting 59" For version 5.7 and earlier: only when not done already 60" For version 5.8 and later: only when an item doesn't have highlighting yet 61if version >= 508 || !exists("did_tssop_syntax_inits") 62 if version < 508 63 let did_tssop_syntax_inits = 1 64 command -nargs=+ HiLink hi link <args> 65 else 66 command -nargs=+ HiLink hi def link <args> 67 endif 68 69 HiLink tssopParam Statement 70 HiLink tssopProp Identifier 71 HiLink tssopArgs Special 72 73 HiLink tssopComment Statement 74 HiLink tssopCommentString Comment 75 HiLink tssopPropName Typedef 76 77 HiLink tssopInteger Number 78 HiLink tssopFloat Float 79 HiLink tssopScientific Float 80 81 delcommand HiLink 82endif 83 84 85let b:current_syntax = "tssop" 86 87" vim: ts=8 sw=2 88