2 " Language: Inno Setup File (iss file) and My InnoSetup extension
3 " Maintainer: Jason Mills (jmills@cs.mun.ca)
4 " Previous Maintainer: Dominique Stéphan (dominique@mggen.com)
5 " Last Change: 2004 Dec 14
8 " - The paramter String: is matched as flag string (because of case ignore).
9 " - Pascal scripting syntax is not recognized.
10 " - Embedded double quotes confuse string matches. e.g. "asfd""asfa"
12 " For version 5.x: Clear all syntax items
13 " For version 6.x: Quit when a syntax file was already loaded
16 elseif exists("b:current_syntax")
24 syn region issPreProc start="^\s*#" end="$"
27 syn region issSection start="\[" end="\]"
29 " Label in the [Setup] Section
30 syn match issDirective "^[^=]\+="
33 syn match issURL "http[s]\=:\/\/.*$"
35 " Parameters used for any section.
36 " syn match issParam"[^: ]\+:"
37 syn match issParam "Name:"
38 syn match issParam "MinVersion:\|OnlyBelowVersion:\|Languages:"
39 syn match issParam "Source:\|DestDir:\|DestName:\|CopyMode:"
40 syn match issParam "Attribs:\|Permissions:\|FontInstall:\|Flags:"
41 syn match issParam "FileName:\|Parameters:\|WorkingDir:\|HotKey:\|Comment:"
42 syn match issParam "IconFilename:\|IconIndex:"
43 syn match issParam "Section:\|Key:\|String:"
44 syn match issParam "Root:\|SubKey:\|ValueType:\|ValueName:\|ValueData:"
45 syn match issParam "RunOnceId:"
46 syn match issParam "Type:\|Excludes:"
47 syn match issParam "Components:\|Description:\|GroupDescription:\|Types:\|ExtraDiskSpaceRequired:"
48 syn match issParam "StatusMsg:\|RunOnceId:\|Tasks:"
49 syn match issParam "MessagesFile:\|LicenseFile:\|InfoBeforeFile:\|InfoAfterFile:"
51 syn match issComment "^\s*;.*$"
54 syn match issFolder "{[^{]*}"
57 syn region issString start=+"+ end=+"+ contains=issFolder
60 syn keyword issDirsFlags deleteafterinstall uninsalwaysuninstall uninsneveruninstall
63 syn keyword issFilesCopyMode normal onlyifdoesntexist alwaysoverwrite alwaysskipifsameorolder dontcopy
64 syn keyword issFilesAttribs readonly hidden system
65 syn keyword issFilesPermissions full modify readexec
66 syn keyword issFilesFlags allowunsafefiles comparetimestampalso confirmoverwrite deleteafterinstall
67 syn keyword issFilesFlags dontcopy dontverifychecksum external fontisnttruetype ignoreversion
68 syn keyword issFilesFlags isreadme onlyifdestfileexists onlyifdoesntexist overwritereadonly
69 syn keyword issFilesFlags promptifolder recursesubdirs regserver regtypelib restartreplace
70 syn keyword issFilesFlags sharedfile skipifsourcedoesntexist sortfilesbyextension touch
71 syn keyword issFilesFlags uninsremovereadonly uninsrestartdelete uninsneveruninstall
72 syn keyword issFilesFlags replacesameversion nocompression noencryption noregerror
76 syn keyword issIconsFlags closeonexit createonlyiffileexists dontcloseonexit
77 syn keyword issIconsFlags runmaximized runminimized uninsneveruninstall useapppaths
80 syn keyword issINIFlags createkeyifdoesntexist uninsdeleteentry uninsdeletesection uninsdeletesectionifempty
83 syn keyword issRegRootKey HKCR HKCU HKLM HKU HKCC
84 syn keyword issRegValueType none string expandsz multisz dword binary
85 syn keyword issRegFlags createvalueifdoesntexist deletekey deletevalue dontcreatekey
86 syn keyword issRegFlags preservestringtype noerror uninsclearvalue
87 syn keyword issRegFlags uninsdeletekey uninsdeletekeyifempty uninsdeletevalue
89 " [Run] and [UninstallRun]
90 syn keyword issRunFlags hidewizard nowait postinstall runhidden runmaximized
91 syn keyword issRunFlags runminimized shellexec skipifdoesntexist skipifnotsilent
92 syn keyword issRunFlags skipifsilent unchecked waituntilidle
95 syn keyword issTypesFlags iscustom
98 syn keyword issComponentsFlags dontinheritcheck exclusive fixed restart disablenouninstallwarning
100 " [UninstallDelete] and [InstallDelete]
101 syn keyword issInstallDeleteType files filesandordirs dirifempty
104 syn keyword issTasksFlags checkedonce dontinheritcheck exclusive restart unchecked
107 " Define the default highlighting.
108 " For version 5.7 and earlier: only when not done already
109 " For version 5.8 and later: only when an item doesn't have highlighting yet
110 if version >= 508 || !exists("did_iss_syntax_inits")
112 let did_iss_syntax_inits = 1
113 command -nargs=+ HiLink hi link <args>
115 command -nargs=+ HiLink hi def link <args>
118 " The default methods for highlighting. Can be overridden later
119 HiLink issSection Special
120 HiLink issComment Comment
121 HiLink issDirective Type
123 HiLink issFolder Special
124 HiLink issString String
125 HiLink issURL Include
126 HiLink issPreProc PreProc
128 HiLink issDirsFlags Keyword
129 HiLink issFilesCopyMode Keyword
130 HiLink issFilesAttribs Keyword
131 HiLink issFilesPermissions Keyword
132 HiLink issFilesFlags Keyword
133 HiLink issIconsFlags Keyword
134 HiLink issINIFlags Keyword
135 HiLink issRegRootKey Keyword
136 HiLink issRegValueType Keyword
137 HiLink issRegFlags Keyword
138 HiLink issRunFlags Keyword
139 HiLink issTypesFlags Keyword
140 HiLink issComponentsFlags Keyword
141 HiLink issInstallDeleteType Keyword
142 HiLink issTasksFlags Keyword
147 let b:current_syntax = "iss"