]> git.sur5r.net Git - bacula/bacula/blob - bacula/scripts/bacula.vim
Add Phil Stracchino's fix for Qt5
[bacula/bacula] / bacula / scripts / bacula.vim
1 " Vim syntax file
2 " Put this file to your $HOME/.vim/syntax/ and use :syntax on
3 " Language:         Bacula
4 " Maintainer:       Eric Bollengier <eric@eb.homelinux.org>
5 " URL:              
6 " Latest Revision:  2007-02-11
7
8
9 if version < 600
10   syntax clear
11 elseif exists("b:current_syntax")
12   finish
13 endif
14
15
16 " comments
17 syn region      BacComment  display oneline start="#" end="$" keepend contains=BacTodo
18 syn region      BacComment2 start="/\*"  end="\*/" 
19
20 syn region      BacInclude start=/^@/ end="$"
21
22 syntax region xCond start=/\w+\s*{/ms=e+1 end=/}/me=s-1
23 syntax keyword BacName Name
24 syn case ignore
25
26 syn keyword  LevelElt  contained Full Incremental Differential
27
28 " todo
29 syn keyword     BacTodo       contained TODO FIXME XXX NOTE
30 syn region      BacString     start=/"/ skip=/\\"/ end=/"/
31
32 " Specifique Client {
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
38
39 " FileSet {
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 aclsupport
45 syn match     BacFSOpt2  contained /ignore case/
46 syn keyword   BacFS1     contained File
47 syn match     BacFS2     contained /Enable VSS/
48
49 " Storage {
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/
53
54 " Director {
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/
58
59 " Catalog {
60 syn region   BacCat     display start="Catalog {" end="}" contains=BacName,BacComment,BacString,BacCat1
61 syn keyword  BacCat1    contained dbname user password dbport
62
63 " Job {
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
67
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/
71
72
73 " RunScript {
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
80
81 " Schedule {
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
88
89 syn keyword  BacSpecial   false  true yes no
90
91 " Pool
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
96
97 syn case match
98 if version >= 508 || !exists("did_screen_syn_inits")
99   if version < 508
100     let did_screen_syn_inits = 1
101     command -nargs=+ HiLink hi link <args>
102   else
103     command -nargs=+ HiLink hi def link <args>
104   endif
105
106 " Define the default highlighting.
107
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
116
117 HiLink BacInclude   Include
118 HiLink BacComment   Comment
119 HiLink BacComment2  Comment
120 HiLink BacTodo      Todo
121 HiLink LevelElt     String
122 HiLink BacRun       Function
123
124 HiLink BacCat       Function
125 HiLink BacCat1      Keyword
126
127 HiLink BacSto       Function
128 HiLink BacSto1      Keyword
129 HiLink BacSto2      Keyword
130
131 HiLink BacDir       Function
132 HiLink BacDir1      keyword
133 HiLink BacDir2      keyword
134
135 HiLink BacJob       Function
136 HiLink BacJobDefs   Function
137 HiLink BacJ1        Keyword
138 HiLink BacJ2        Keyword
139 HiLink BacJ3        Keyword
140
141 HiLink BacClient    Function
142 HiLink BacC1        Keyword
143 HiLink BacC2        Keyword
144 HiLink BacC3        Keyword
145 HiLink BacC4        Keyword
146 HiLink Level        Keyword
147
148 HiLink BacSched     Function
149 HiLink BacS1        Keyword
150 HiLink BacS2        String
151 HiLink BacS3        String
152 HiLink BacS4        String
153
154 HiLink BacR1        Keyword
155 HiLink BacR2        Keyword
156 HiLink BacR3        Keyword
157 HiLink BacR4        Keyword
158 HiLink BacRW        String
159
160 HiLink BacPool      Function
161 HiLink BacP1        Keyword
162 HiLink BacP2        Keyword
163 HiLink BacP3        Keyword
164
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
172 HiLink Equal        Comment
173 delcommand HiLink
174
175 endif
176