1" Vim syntax file
2" Language:	WinBatch/Webbatch (*.wbt, *.web)
3" Maintainer:	dominique@mggen.com
4" URL:		http://www.mggen.com/vim/syntax/winbatch.zip
5" Last change:	2001 May 10
6
7" For version 5.x: Clear all syntax items
8" For version 6.x: Quit when a syntax file was already loaded
9if version < 600
10  syntax clear
11elseif exists("b:current_syntax")
12  finish
13endif
14
15syn case ignore
16
17syn keyword winbatchCtl	if then else endif break end return exit next
18syn keyword winbatchCtl while for gosub goto switch select to case
19syn keyword winbatchCtl endselect endwhile endselect endswitch
20
21" String
22syn region  winbatchVar		start=+%+  end=+%+
23" %var% in strings
24syn region  winbatchString	start=+"+  end=+"+ contains=winbatchVar
25
26syn match winbatchComment	";.*$"
27syn match winbatchLabel		"^\ *:[0-9a-zA-Z_\-]\+\>"
28
29" constant (bezgin by @)
30syn match winbatchConstant	"@[0_9a-zA-Z_\-]\+"
31
32" number
33syn match winbatchNumber	"\<[0-9]\+\(u\=l\=\|lu\|f\)\>"
34
35syn keyword winbatchImplicit aboveicons acc_attrib acc_chng_nt acc_control acc_create
36syn keyword winbatchImplicit acc_delete acc_full_95 acc_full_nt acc_list acc_pfull_nt
37syn keyword winbatchImplicit acc_pmang_nt acc_print_nt acc_read acc_read_95 acc_read_nt
38syn keyword winbatchImplicit acc_write amc arrange ascending attr_a attr_a attr_ci attr_ci
39syn keyword winbatchImplicit attr_dc attr_dc attr_di attr_di attr_dm attr_dm attr_h attr_h
40syn keyword winbatchImplicit attr_ic attr_ic attr_p attr_p attr_ri attr_ri attr_ro attr_ro
41syn keyword winbatchImplicit attr_sh attr_sh attr_sy attr_sy attr_t attr_t attr_x attr_x
42syn keyword winbatchImplicit avogadro backscan boltzmann cancel capslock check columns
43syn keyword winbatchImplicit commonformat cr crlf ctrl default default deg2rad descending
44syn keyword winbatchImplicit disable drive electric enable eulers false faraday float8
45syn keyword winbatchImplicit fwdscan gftsec globalgroup gmtsec goldenratio gravitation hidden
46syn keyword winbatchImplicit icon lbutton lclick ldblclick lf lightmps lightmtps localgroup
47syn keyword winbatchImplicit magfield major mbokcancel mbutton mbyesno mclick mdblclick minor
48syn keyword winbatchImplicit msformat multiple ncsaformat no none none noresize normal
49syn keyword winbatchImplicit notify nowait numlock off on open parsec parseonly pi
50syn keyword winbatchImplicit planckergs planckjoules printer rad2deg rbutton rclick rdblclick
51syn keyword winbatchImplicit regclasses regcurrent regmachine regroot regusers rows save
52syn keyword winbatchImplicit scrolllock server shift single sorted stack string tab tile
53syn keyword winbatchImplicit true uncheck unsorted wait wholesection word1 word2 word4 yes
54syn keyword winbatchImplicit zoomed about abs acos addextender appexist appwaitclose asin
55syn keyword winbatchImplicit askfilename askfiletext askitemlist askline askpassword askyesno
56syn keyword winbatchImplicit atan average beep binaryalloc binarycopy binaryeodget binaryeodset
57syn keyword winbatchImplicit binaryfree binaryhashrec binaryincr binaryincr2 binaryincr4
58syn keyword winbatchImplicit binaryincrflt binaryindex binaryindexnc binaryoletype binarypeek
59syn keyword winbatchImplicit binarypeek2 binarypeek4 binarypeekflt binarypeekstr binarypoke
60syn keyword winbatchImplicit binarypoke2 binarypoke4 binarypokeflt binarypokestr binaryread
61syn keyword winbatchImplicit binarysort binarystrcnt binarywrite boxbuttondraw boxbuttonkill
62syn keyword winbatchImplicit boxbuttonstat boxbuttonwait boxcaption boxcolor
63syn keyword winbatchImplicit boxdataclear boxdatatag
64syn keyword winbatchImplicit boxdestroy boxdrawcircle boxdrawline boxdrawrect boxdrawtext
65syn keyword winbatchImplicit boxesup boxmapmode boxnew boxopen boxpen boxshut boxtext boxtextcolor
66syn keyword winbatchImplicit boxtextfont boxtitle boxupdates break buttonnames by call
67syn keyword winbatchImplicit callext ceiling char2num clipappend clipget clipput
68syn keyword winbatchImplicit continue cos cosh datetime
69syn keyword winbatchImplicit ddeexecute ddeinitiate ddepoke dderequest ddeterminate
70syn keyword winbatchImplicit ddetimeout debug debugdata decimals delay dialog
71syn keyword winbatchImplicit dialogbox dirattrget dirattrset dirchange direxist
72syn keyword winbatchImplicit dirget dirhome diritemize dirmake dirremove dirrename
73syn keyword winbatchImplicit dirwindows diskexist diskfree diskinfo diskscan disksize
74syn keyword winbatchImplicit diskvolinfo display dllcall dllfree dllhinst dllhwnd dllload
75syn keyword winbatchImplicit dosboxcursorx dosboxcursory dosboxgetall dosboxgetdata
76syn keyword winbatchImplicit dosboxheight dosboxscrmode dosboxversion dosboxwidth dosversion
77syn keyword winbatchImplicit drop edosgetinfo edosgetvar edoslistvars edospathadd edospathchk
78syn keyword winbatchImplicit edospathdel edossetvar
79syn keyword winbatchImplicit endsession envgetinfo envgetvar environment
80syn keyword winbatchImplicit environset envitemize envlistvars envpathadd envpathchk
81syn keyword winbatchImplicit envpathdel envsetvar errormode exclusive execute exetypeinfo
82syn keyword winbatchImplicit exp fabs fileappend fileattrget fileattrset fileclose
83syn keyword winbatchImplicit filecompare filecopy filedelete fileexist fileextension filefullname
84syn keyword winbatchImplicit fileitemize filelocate filemapname filemove filenameeval1
85syn keyword winbatchImplicit filenameeval2 filenamelong filenameshort fileopen filepath
86syn keyword winbatchImplicit fileread filerename fileroot filesize filetimecode filetimeget
87syn keyword winbatchImplicit filetimeset filetimetouch fileverinfo filewrite fileymdhms
88syn keyword winbatchImplicit findwindow floor getexacttime gettickcount
89syn keyword winbatchImplicit iconarrange iconreplace ignoreinput inidelete inideletepvt
90syn keyword winbatchImplicit iniitemize iniitemizepvt iniread inireadpvt iniwrite iniwritepvt
91syn keyword winbatchImplicit installfile int intcontrol isdefined isfloat isint iskeydown
92syn keyword winbatchImplicit islicensed isnumber itemcount itemextract iteminsert itemlocate
93syn keyword winbatchImplicit itemremove itemselect itemsort keytoggleget keytoggleset
94syn keyword winbatchImplicit lasterror log10 logdisk loge max message min mod mouseclick
95syn keyword winbatchImplicit mouseclickbtn mousedrag mouseinfo mousemove msgtextget n3attach
96syn keyword winbatchImplicit n3captureend n3captureprt n3chgpassword n3detach n3dirattrget
97syn keyword winbatchImplicit n3dirattrset n3drivepath n3drivepath2 n3drivestatus n3fileattrget
98syn keyword winbatchImplicit n3fileattrset n3getloginid n3getmapped n3getnetaddr n3getuser
99syn keyword winbatchImplicit n3getuserid n3logout n3map n3mapdelete n3mapdir n3maproot n3memberdel
100syn keyword winbatchImplicit n3memberget n3memberset n3msgsend n3msgsendall n3serverinfo
101syn keyword winbatchImplicit n3serverlist n3setsrchdrv n3usergroups n3version n4attach
102syn keyword winbatchImplicit n4captureend n4captureprt n4chgpassword n4detach n4dirattrget
103syn keyword winbatchImplicit n4dirattrset n4drivepath n4drivestatus n4fileattrget n4fileattrset
104syn keyword winbatchImplicit n4getloginid n4getmapped n4getnetaddr n4getuser n4getuserid
105syn keyword winbatchImplicit n4login n4logout n4map n4mapdelete n4mapdir n4maproot n4memberdel
106syn keyword winbatchImplicit n4memberget n4memberset n4msgsend n4msgsendall n4serverinfo
107syn keyword winbatchImplicit n4serverlist n4setsrchdrv n4usergroups n4version netadddrive
108syn keyword winbatchImplicit netaddprinter netcancelcon netdirdialog netgetcon netgetuser
109syn keyword winbatchImplicit netinfo netresources netversion num2char objectclose
110syn keyword winbatchImplicit objectopen parsedata pause playmedia playmidi playwaveform
111syn keyword winbatchImplicit print random regapp regclosekey regconnect regcreatekey
112syn keyword winbatchImplicit regdeletekey regdelvalue regentrytype regloadhive regopenkey
113syn keyword winbatchImplicit regquerybin regquerydword regqueryex regqueryexpsz regqueryitem
114syn keyword winbatchImplicit regquerykey regquerymulsz regqueryvalue regsetbin
115syn keyword winbatchImplicit regsetdword regsetex regsetexpsz regsetmulsz regsetvalue
116syn keyword winbatchImplicit regunloadhive reload reload rtstatus run runenviron
117syn keyword winbatchImplicit runexit runhide runhidewait runicon runiconwait runshell runwait
118syn keyword winbatchImplicit runzoom runzoomwait sendkey sendkeyschild sendkeysto
119syn keyword winbatchImplicit sendmenusto shellexecute shortcutedit shortcutextra shortcutinfo
120syn keyword winbatchImplicit shortcutmake sin sinh snapshot sounds sqrt
121syn keyword winbatchImplicit srchfree srchinit srchnext strcat strcharcount strcmp
122syn keyword winbatchImplicit strfill strfix strfixchars stricmp strindex strlen
123syn keyword winbatchImplicit strlower strreplace strscan strsub strtrim strupper
124syn keyword winbatchImplicit tan tanh tcpaddr2host tcpftpchdir tcpftpclose tcpftpget
125syn keyword winbatchImplicit tcpftplist tcpftpmode tcpftpopen tcpftpput tcphost2addr tcphttpget
126syn keyword winbatchImplicit tcphttppost tcpparmget tcpparmset tcpping tcpsmtp terminate
127syn keyword winbatchImplicit textbox textboxsort textoutbufdel textoutbuffer textoutdebug
128syn keyword winbatchImplicit textoutfree textoutinfo textoutreset textouttrack textouttrackb
129syn keyword winbatchImplicit textouttrackp textoutwait textselect timeadd timedate
130syn keyword winbatchImplicit timedelay timediffdays timediffsecs timejulianday timejultoymd
131syn keyword winbatchImplicit timesubtract timewait timeymdhms version versiondll
132syn keyword winbatchImplicit w3addcon w3cancelcon w3dirbrowse w3getcaps w3getcon w3netdialog
133syn keyword winbatchImplicit w3netgetuser w3prtbrowse w3version w95accessadd w95accessdel
134syn keyword winbatchImplicit w95adddrive w95addprinter w95cancelcon w95dirdialog w95getcon
135syn keyword winbatchImplicit w95getuser w95resources w95shareadd w95sharedel w95shareset
136syn keyword winbatchImplicit w95version waitforkey wallpaper webbaseconv webcloselog
137syn keyword winbatchImplicit webcmddata webcondata webcounter webdatdata webdumperror webhashcode
138syn keyword winbatchImplicit webislocal weblogline webopenlog webout weboutfile webparamdata
139syn keyword winbatchImplicit webparamnames websettimeout webverifycard winactivate
140syn keyword winbatchImplicit winactivchild winarrange winclose winclosenot winconfig winexename
141syn keyword winbatchImplicit winexist winparset winparget winexistchild wingetactive
142syn keyword winbatchImplicit winhelp winhide winiconize winidget winisdos winitemchild
143syn keyword winbatchImplicit winitemize winitemnameid winmetrics winname winparmget
144syn keyword winbatchImplicit winparmset winplace winplaceget winplaceset
145syn keyword winbatchImplicit winposition winresources winshow winstate winsysinfo
146syn keyword winbatchImplicit wintitle winversion winwaitchild winwaitclose winwaitexist
147syn keyword winbatchImplicit winzoom wnaddcon wncancelcon wncmptrinfo wndialog
148syn keyword winbatchImplicit wndlgbrowse wndlgcon wndlgcon2 wndlgcon3
149syn keyword winbatchImplicit wndlgcon4 wndlgdiscon wndlgnoshare wndlgshare wngetcaps
150syn keyword winbatchImplicit wngetcon wngetuser wnnetnames wnrestore wnservers wnsharecnt
151syn keyword winbatchImplicit wnsharename wnsharepath wnshares wntaccessadd wntaccessdel
152syn keyword winbatchImplicit wntaccessget wntadddrive wntaddprinter wntcancelcon wntdirdialog
153syn keyword winbatchImplicit wntgetcon wntgetuser wntlistgroups wntmemberdel wntmemberget
154syn keyword winbatchImplicit wntmembergrps wntmemberlist wntmemberset wntresources wntshareadd
155syn keyword winbatchImplicit wntsharedel wntshareset wntversion wnversion wnwrkgroups wwenvunload
156syn keyword winbatchImplicit xbaseconvert xcursorset xdisklabelget xdriveready xextenderinfo
157syn keyword winbatchImplicit xgetchildhwnd xgetelapsed xhex xmemcompact xmessagebox
158syn keyword winbatchImplicit xsendmessage xverifyccard yield
159
160" Define the default highlighting.
161" For version 5.7 and earlier: only when not done already
162" For version 5.8 and later: only when an item doesn't have highlighting yet
163if version >= 508 || !exists("did_winbatch_syntax_inits")
164  if version < 508
165    let did_winbatch_syntax_inits = 1
166    command -nargs=+ HiLink hi link <args>
167  else
168    command -nargs=+ HiLink hi def link <args>
169  endif
170
171  HiLink winbatchLabel		PreProc
172  HiLink winbatchCtl		Operator
173  HiLink winbatchStatement	Statement
174  HiLink winbatchTodo		Todo
175  HiLink winbatchString		String
176  HiLink winbatchVar		Type
177  HiLink winbatchComment	Comment
178  HiLink winbatchImplicit	Special
179  HiLink winbatchNumber		Number
180  HiLink winbatchConstant	StorageClass
181
182  delcommand HiLink
183endif
184
185let b:current_syntax = "winbatch"
186
187" vim: ts=8
188