2 " Language: Inno Setup File (iss file) and My InnoSetup extension
3 " Maintainer: Dominique Stéphan (dominique@mggen.com)
4 " Last change: 2001 May 10
6 " For version 5.x: Clear all syntax items
7 " For version 6.x: Quit when a syntax file was already loaded
10 elseif exists("b:current_syntax")
18 syn region issHeader start="\[" end="\]"
20 " Label in the [Setup] Section
21 syn match issLabel "^[^=]\+="
24 syn match issURL "http[s]\=:\/\/.*$"
26 " syn match issName "[^: ]\+:"
27 syn match issName "Name:"
28 syn match issName "MinVersion:\|OnlyBelowVersion:"
29 syn match issName "Source:\|DestDir:\|DestName:\|CopyMode:"
30 syn match issName "Attribs:\|FontInstall:\|Flags:"
31 syn match issName "FileName:\|Parameters:\|WorkingDir:\|Comment:"
32 syn match issName "IconFilename:\|IconIndex:"
33 syn match issName "Section:\|Key:\|String:"
34 syn match issName "Root:\|SubKey:\|ValueType:\|ValueName:\|ValueData:"
35 syn match issName "RunOnceId:"
36 syn match issName "Type:"
37 syn match issName "Components:\|Description:\|GroupDescription\|Types:"
39 syn match issComment "^;.*$"
42 syn match issFolder "{[^{]*}"
45 syn region issString start=+"+ end=+"+ contains=issFolder
48 syn keyword issDirsFlags deleteafterinstall uninsalwaysuninstall uninsneveruninstall
51 syn keyword issFilesCopyMode normal onlyifdoesntexist alwaysoverwrite alwaysskipifsameorolder
52 syn keyword issFilesAttribs readonly hidden system
53 syn keyword issFilesFlags comparetimestampalso confirmoverwrite deleteafterinstall
54 syn keyword issFilesFlags external fontisnttruetype isreadme overwritereadonly
55 syn keyword issFilesFlags regserver regtypelib restartreplace
56 syn keyword issFilesFlags sharedfile skipifsourcedoesntexist uninsneveruninstall
59 syn keyword issIconsFlags createonlyiffileexists runminimized uninsneveruninstall useapppaths
62 syn keyword issINIFlags createkeyifdoesntexist uninsdeleteentry uninsdeletesection uninsdeletesectionifempty
65 syn keyword issRegRootKey HKCR HKCU HKLM HKU HKCC
66 syn keyword issRegValueType none string expandsz multisz dword binary
67 syn keyword issRegFlags createvalueifdoesntexist deletekey deletevalue preservestringtype
68 syn keyword issRegFlags uninsclearvalue uninsdeletekey uninsdeletekeyifempty uninsdeletevalue
70 " [Run] and [UninstallRun]
71 syn keyword issRunFlags nowait shellexec skipifdoesntexist runminimized waituntilidle
72 syn keyword issRunFlags postinstall unchecked showcheckbox
75 syn keyword issTypesFlags iscustom
78 syn keyword issComponentsFlags fixed restart disablenouninstallwarning
80 " [UninstallDelete] and [InstallDelete]
81 syn keyword issInstallDeleteType files filesandordirs dirifempty
84 " Define the default highlighting.
85 " For version 5.7 and earlier: only when not done already
86 " For version 5.8 and later: only when an item doesn't have highlighting yet
87 if version >= 508 || !exists("did_iss_syntax_inits")
89 let did_iss_syntax_inits = 1
90 command -nargs=+ HiLink hi link <args>
92 command -nargs=+ HiLink hi def link <args>
95 " The default methods for highlighting. Can be overridden later
96 HiLink issHeader Special
97 HiLink issComment Comment
100 HiLink issFolder Special
101 HiLink issString String
102 HiLink issValue String
103 HiLink issURL Include
105 HiLink issDirsFlags Keyword
106 HiLink issFilesCopyMode Keyword
107 HiLink issFilesAttribs Keyword
108 HiLink issFilesFlags Keyword
109 HiLink issIconsFlags Keyword
110 HiLink issINIFlags Keyword
111 HiLink issRegRootKey Keyword
112 HiLink issRegValueType Keyword
113 HiLink issRegFlags Keyword
114 HiLink issRunFlags Keyword
115 HiLink issTypesFlags Keyword
116 HiLink issComponentsFlags Keyword
117 HiLink issInstallDeleteType Keyword
123 let b:current_syntax = "iss"