2 " Put this file to your $HOME/.vim/syntax/ and use :syntax on
4 " Maintainer: Eric Bollengier <eric@eb.homelinux.org>
6 " Latest Revision: 2007-02-11
11 elseif exists("b:current_syntax")
17 syn region BacComment display oneline start="#" end="$" keepend contains=BacTodo
18 syn region BacComment2 start="/\*" end="\*/"
20 syn region BacInclude start=/^@/ end="$"
22 syntax region xCond start=/\w+\s*{/ms=e+1 end=/}/me=s-1
23 syntax keyword BacName Name
26 syn keyword LevelElt contained Full Incremental Differential
29 syn keyword BacTodo contained TODO FIXME XXX NOTE
30 syn region BacString start=/"/ skip=/\\"/ end=/"/
33 syn region BacClient display start=/Client {/ end="^}" contains=BacString,BacComment,BacC1,BacC2,BacC3,BacC4
34 syn match BacC1 contained /File\s*Retention/
35 syn match BacC2 contained /Maximum\s*Concurrent\s*Jobs/
36 syn match BacC3 contained /Job\s*Retention/
37 syn keyword BacC4 contained Name Password Address Catalog AutoPrune FDPort
40 syn region BacFileSet display start="FileSet {" end="^}" contains=BacString,BacComment,BacName,BacFSInc,BacFSExc,BacFS2
41 syn region BacFSInc contained display start="Include {" end="}" contains=BacString,BacComment,BacFSOpt,BacFS1
42 syn region BacFSExc contained display start="Exclude {" end="}" contains=BacString,BacComment,BacFSOpt,BacFS1
43 syn region BacFSOpt contained display start="Options {" end="}" contains=BacString,BacComment,BacFSOpt1,BacFSOpt2
44 syn keyword BacFSOpt1 contained verify signature onefs noatime RegexFile Exclude Wild WildDir WildFile CheckChanges
45 syn match BacFSOpt2 contained /ignore case/
46 syn keyword BacFS1 contained File
47 syn match BacFS2 contained /Enable VSS/
50 syn region BacSto display start="Storage {" end="}" contains=BacName,BacComment,BacString,BacSto1,BacSto2
51 syn keyword BacSto1 contained Address SDPort Password Device Autochanger
52 syn match BacSto2 contained /Media\s*Type/
55 syn region BacDir display start="Director {" end="}" contains=BacName,BacComment,BacString,BacDir,BacDir1,BacDir2
56 syn keyword BacDir1 contained DIRport QueryFile WorkingDirectory PidDirectory Password Messages
57 syn match BacDir2 contained /Maximum\s*Concurrent\s*Jobs/
60 syn region BacCat display start="Catalog {" end="}" contains=BacName,BacComment,BacString,BacCat1
61 syn keyword BacCat1 contained dbname user password dbport
64 syn region BacJob display start="Job {" end="^}" contains=BacJ1,BacJ2,BacString,BacComment,Level,BacC2,BacJ3,BacRun
65 syn region BacJobDefs display start="JobDefs {" end="^}" contains=BacJ1,BacJ2,BacString,BacComment,Level,BacC2,BacJ3
66 syn region Level display start="Level =" end="$" contains=LevelElt
68 syn keyword BacJ1 contained Schedule Name Priority Client Pool JobDefs FileSet SpoolData Storage where
69 syn keyword BacJ2 contained RunBeforeJob RunAfterJob Type Messages ClientRunAfterJob
70 syn match BacJ3 contained /Write Bootstrap/
74 syn region BacRun contained display start="RunScript {" end="}" contains=BacR1,BacR2,BacR3,BacR4,BacRW,BacString,BacComment
75 syn match BacR1 contained /Runs\s*When/
76 syn match BacR2 contained /Runs\s*On\s*Client/
77 syn match BacR3 contained /Runs\s*On\s*Failure/
78 syn keyword BacR4 contained Command
79 syn keyword BacRW contained After Before Always
82 syn region BacSched display start="Schedule {" end="^}" contains=BacSR,BacString,BacComment,BacName,BacRun
83 syn keyword BacS1 contained Pool FullPool on at
84 syn keyword BacS2 contained sun mon tue wed thu fri sat sunday monday tuesday wednesday thursday friday saturday
85 syn keyword BacS3 contained jan feb mar apr may jun jul aug sep oct nov dec
86 syn keyword BacS4 contained 1st 2nd 3rd 4th 5th first second third fourth fifth
87 syn region BacSR contained display start="Run = " end="$" contains=BacS1,BacS2,BacS3,BacS4,LevelElt
89 syn keyword BacSpecial false true yes no
92 syn region BacPool display start="Pool {" end="^}" contains=BacP1,BacP2,BacP3,BacString,BacComment
93 syn match BacP1 contained /Pool\s*Type/
94 syn match BacP2 contained /Volume\s*Retention/
95 syn keyword BacP3 contained Name AutoPrune Recycle
98 if version >= 508 || !exists("did_screen_syn_inits")
100 let did_screen_syn_inits = 1
101 command -nargs=+ HiLink hi link <args>
103 command -nargs=+ HiLink hi def link <args>
106 " Define the default highlighting.
108 HiLink BacFileSet Function
109 HiLink BacFSInc Function
110 HiLink BacFSExc Function
111 HiLink BacFSOpt Function
112 HiLink BacFSOpt1 Keyword
113 HiLink BacFSOpt2 Keyword
114 HiLink BacFS1 Keyword
115 HiLink BacFS2 Keyword
117 HiLink BacInclude Include
118 HiLink BacComment Comment
119 HiLink BacComment2 Comment
121 HiLink LevelElt String
122 HiLink BacRun Function
124 HiLink BacCat Function
125 HiLink BacCat1 Keyword
127 HiLink BacSto Function
128 HiLink BacSto1 Keyword
129 HiLink BacSto2 Keyword
131 HiLink BacDir Function
132 HiLink BacDir1 keyword
133 HiLink BacDir2 keyword
135 HiLink BacJob Function
136 HiLink BacJobDefs Function
141 HiLink BacClient Function
148 HiLink BacSched Function
160 HiLink BacPool Function
165 HiLink BacName Keyword
166 HiLink BacString String
167 HiLink BacNumber Number
168 HiLink BacCommand BacCommands
169 HiLink BacCommands Keyword
170 HiLink BacSpecial Boolean
171 HiLink BacKey Function