blob: 49fa17abf115b5bd158327c1de5d970369ead281 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim syntax file
Bram Moolenaar079ba762021-10-23 12:08:41 +01002" Language: NSIS script, for version of NSIS 3.08 and later
Bram Moolenaar40962ec2018-01-28 22:47:25 +01003" Maintainer: Ken Takata
4" URL: https://github.com/k-takata/vim-nsis
5" Previous Maintainer: Alex Jakushev <Alex.Jakushev@kemek.lt>
Bram Moolenaard13166e2022-11-18 21:49:57 +00006" Last Change: 2022-11-05
Bram Moolenaar071d4272004-06-13 20:20:40 +00007
Bram Moolenaar89bcfda2016-08-30 23:26:57 +02008" quit when a syntax file was already loaded
9if exists("b:current_syntax")
Bram Moolenaar071d4272004-06-13 20:20:40 +000010 finish
11endif
12
Bram Moolenaar40962ec2018-01-28 22:47:25 +010013let s:cpo_save = &cpo
14set cpo&vim
15
Bram Moolenaar071d4272004-06-13 20:20:40 +000016syn case ignore
17
18
Bram Moolenaar40962ec2018-01-28 22:47:25 +010019"Pseudo definitions
20syn match nsisLine nextgroup=@nsisPseudoStatement skipwhite "^"
21syn cluster nsisPseudoStatement contains=nsisFirstComment,nsisLocalLabel,nsisGlobalLabel
22syn cluster nsisPseudoStatement add=nsisDefine,nsisPreCondit,nsisMacro,nsisInclude,nsisSystem
23syn cluster nsisPseudoStatement add=nsisAttribute,nsisCompiler,nsisVersionInfo,nsisInstruction,nsisStatement
24
25"COMMENTS (4.1)
Bram Moolenaar071d4272004-06-13 20:20:40 +000026syn keyword nsisTodo todo attention note fixme readme
Bram Moolenaar40962ec2018-01-28 22:47:25 +010027syn region nsisComment start="[;#]" end="$" contains=nsisTodo,nsisLineContinuation,@Spell oneline
28syn region nsisComment start=".\@1<=/\*" end="\*/" contains=nsisTodo,@Spell
29syn region nsisFirstComment start="/\*" end="\*/" contained contains=nsisTodo,@Spell skipwhite
30 \ nextgroup=@nsisPseudoStatement
Bram Moolenaar071d4272004-06-13 20:20:40 +000031
Bram Moolenaar40962ec2018-01-28 22:47:25 +010032syn match nsisLineContinuation "\\$"
Bram Moolenaar071d4272004-06-13 20:20:40 +000033
Bram Moolenaar40962ec2018-01-28 22:47:25 +010034"STRINGS (4.1)
35syn region nsisString start=/"/ end=/"/ contains=@nsisStringItems,@Spell
36syn region nsisString start=/'/ end=/'/ contains=@nsisStringItems,@Spell
37syn region nsisString start=/`/ end=/`/ contains=@nsisStringItems,@Spell
Bram Moolenaar071d4272004-06-13 20:20:40 +000038
Bram Moolenaar40962ec2018-01-28 22:47:25 +010039syn cluster nsisStringItems contains=nsisPreprocSubst,nsisPreprocLangStr,nsisPreprocEnvVar,nsisUserVar,nsisSysVar,nsisRegistry,nsisLineContinuation
Bram Moolenaar071d4272004-06-13 20:20:40 +000040
Bram Moolenaar40962ec2018-01-28 22:47:25 +010041"NUMBERS (4.1)
42syn match nsisNumber "\<[1-9]\d*\>"
43syn match nsisNumber "\<0x\x\+\>"
44syn match nsisNumber "\<0\o*\>"
45
46"STRING REPLACEMENT (5.4, 4.9.15.2, 5.3.1)
47syn region nsisPreprocSubst start="\${" end="}" contains=nsisPreprocSubst,nsisPreprocLangStr,nsisPreprocEnvVar
48syn region nsisPreprocLangStr start="\$(" end=")" contains=nsisPreprocSubst,nsisPreprocLangStr,nsisPreprocEnvVar
49syn region nsisPreprocEnvVar start="\$%" end="%" contains=nsisPreprocSubst,nsisPreprocLangStr,nsisPreprocEnvVar
50
51"VARIABLES (4.2.2)
Bram Moolenaar071d4272004-06-13 20:20:40 +000052syn match nsisUserVar "$\d"
53syn match nsisUserVar "$R\d"
54syn match nsisSysVar "$INSTDIR"
55syn match nsisSysVar "$OUTDIR"
56syn match nsisSysVar "$CMDLINE"
Bram Moolenaar40962ec2018-01-28 22:47:25 +010057syn match nsisSysVar "$LANGUAGE"
58"CONSTANTS (4.2.3)
Bram Moolenaar071d4272004-06-13 20:20:40 +000059syn match nsisSysVar "$PROGRAMFILES"
Bram Moolenaar40962ec2018-01-28 22:47:25 +010060syn match nsisSysVar "$PROGRAMFILES32"
61syn match nsisSysVar "$PROGRAMFILES64"
62syn match nsisSysVar "$COMMONFILES"
63syn match nsisSysVar "$COMMONFILES32"
64syn match nsisSysVar "$COMMONFILES64"
Bram Moolenaar071d4272004-06-13 20:20:40 +000065syn match nsisSysVar "$DESKTOP"
66syn match nsisSysVar "$EXEDIR"
Bram Moolenaar40962ec2018-01-28 22:47:25 +010067syn match nsisSysVar "$EXEFILE"
68syn match nsisSysVar "$EXEPATH"
69syn match nsisSysVar "${NSISDIR}"
Bram Moolenaar071d4272004-06-13 20:20:40 +000070syn match nsisSysVar "$WINDIR"
71syn match nsisSysVar "$SYSDIR"
72syn match nsisSysVar "$TEMP"
73syn match nsisSysVar "$STARTMENU"
74syn match nsisSysVar "$SMPROGRAMS"
75syn match nsisSysVar "$SMSTARTUP"
76syn match nsisSysVar "$QUICKLAUNCH"
Bram Moolenaar40962ec2018-01-28 22:47:25 +010077syn match nsisSysVar "$DOCUMENTS"
78syn match nsisSysVar "$SENDTO"
79syn match nsisSysVar "$RECENT"
80syn match nsisSysVar "$FAVORITES"
81syn match nsisSysVar "$MUSIC"
82syn match nsisSysVar "$PICTURES"
83syn match nsisSysVar "$VIDEOS"
84syn match nsisSysVar "$NETHOOD"
85syn match nsisSysVar "$FONTS"
86syn match nsisSysVar "$TEMPLATES"
87syn match nsisSysVar "$APPDATA"
88syn match nsisSysVar "$LOCALAPPDATA"
89syn match nsisSysVar "$PRINTHOOD"
90syn match nsisSysVar "$INTERNET_CACHE"
91syn match nsisSysVar "$COOKIES"
92syn match nsisSysVar "$HISTORY"
93syn match nsisSysVar "$PROFILE"
94syn match nsisSysVar "$ADMINTOOLS"
95syn match nsisSysVar "$RESOURCES"
96syn match nsisSysVar "$RESOURCES_LOCALIZED"
97syn match nsisSysVar "$CDBURN_AREA"
Bram Moolenaar071d4272004-06-13 20:20:40 +000098syn match nsisSysVar "$HWNDPARENT"
Bram Moolenaar40962ec2018-01-28 22:47:25 +010099syn match nsisSysVar "$PLUGINSDIR"
Bram Moolenaar079ba762021-10-23 12:08:41 +0100100syn match nsisSysVar "$\%(USERTEMPLATES\|USERSTARTMENU\|USERSMPROGRAMS\|USERDESKTOP\)"
101syn match nsisSysVar "$\%(COMMONTEMPLATES\|COMMONSTARTMENU\|COMMONSMPROGRAMS\|COMMONDESKTOP\|COMMONPROGRAMDATA\)"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000102syn match nsisSysVar "$\\r"
103syn match nsisSysVar "$\\n"
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100104syn match nsisSysVar "$\\t"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000105syn match nsisSysVar "$\$"
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100106syn match nsisSysVar "$\\["'`]"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000107
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100108"LABELS (4.3)
Bram Moolenaar2c64ca12018-10-19 16:22:31 +0200109syn match nsisLocalLabel contained "[^-+!$0-9;"'#. \t/*][^ \t:;#]*:\ze\%($\|[ \t;#]\|\/\*\)"
110syn match nsisGlobalLabel contained "\.[^-+!$0-9;"'# \t/*][^ \t:;#]*:\ze\%($\|[ \t;#]\|\/\*\)"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000111
112"CONSTANTS
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100113syn keyword nsisBoolean contained true false
114syn keyword nsisOnOff contained on off
Bram Moolenaar071d4272004-06-13 20:20:40 +0000115
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100116syn keyword nsisRegistry contained HKCR HKLM HKCU HKU HKCC HKDD HKPD SHCTX
117syn keyword nsisRegistry contained HKCR32 HKCR64 HKCU32 HKCU64 HKLM32 HKLM64
118syn keyword nsisRegistry contained HKEY_CLASSES_ROOT HKEY_LOCAL_MACHINE HKEY_CURRENT_USER HKEY_USERS
119syn keyword nsisRegistry contained HKEY_CLASSES_ROOT32 HKEY_CLASSES_ROOT64
120syn keyword nsisRegistry contained HKEY_CURRENT_USER32 HKEY_CURRENT_USER64
121syn keyword nsisRegistry contained HKEY_LOCAL_MACHINE32 HKEY_LOCAL_MACHINE64
122syn keyword nsisRegistry contained HKEY_CURRENT_CONFIG HKEY_DYN_DATA HKEY_PERFORMANCE_DATA
123syn keyword nsisRegistry contained SHELL_CONTEXT
Bram Moolenaar071d4272004-06-13 20:20:40 +0000124
125
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100126" common options
127syn cluster nsisAnyOpt contains=nsisComment,nsisLineContinuation,nsisPreprocSubst,nsisPreprocLangStr,nsisPreprocEnvVar,nsisUserVar,nsisSysVar,nsisString,nsisNumber
128syn region nsisBooleanOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisBoolean
129syn region nsisOnOffOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisOnOff
130syn region nsisLangOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisLangKwd
131syn match nsisLangKwd contained "/LANG\>"
132syn region nsisFontOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisFontKwd
133syn match nsisFontKwd contained "/\%(ITALIC\|UNDERLINE\|STRIKE\)\>"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000134
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100135"STATEMENTS - pages (4.5)
136syn keyword nsisStatement contained Page UninstPage nextgroup=nsisPageOpt skipwhite
137syn region nsisPageOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisPageKwd
138syn keyword nsisPageKwd contained custom license components directory instfiles uninstConfirm
139syn match nsisPageKwd contained "/ENABLECANCEL\>"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000140
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100141syn keyword nsisStatement contained PageEx nextgroup=nsisPageExOpt skipwhite
142syn region nsisPageExOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisPageExKwd
143syn match nsisPageExKwd contained "\<\%(un\.\)\?\%(custom\|license\|components\|directory\|instfiles\|uninstConfirm\)\>"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000144
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100145syn keyword nsisStatement contained PageExEnd PageCallbacks
Bram Moolenaar071d4272004-06-13 20:20:40 +0000146
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100147"STATEMENTS - sections (4.6.1)
148syn keyword nsisStatement contained AddSize SectionEnd SectionGroupEnd
Bram Moolenaar071d4272004-06-13 20:20:40 +0000149
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100150syn keyword nsisStatement contained Section nextgroup=nsisSectionOpt skipwhite
151syn region nsisSectionOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSectionKwd
152syn match nsisSectionKwd contained "/o\>"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000153
Bram Moolenaar079ba762021-10-23 12:08:41 +0100154syn keyword nsisStatement contained SectionInstType SectionIn nextgroup=nsisSectionInOpt skipwhite
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100155syn region nsisSectionInOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSectionInKwd
156syn keyword nsisSectionInKwd contained RO
Bram Moolenaar071d4272004-06-13 20:20:40 +0000157
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100158syn keyword nsisStatement contained SectionGroup nextgroup=nsisSectionGroupOpt skipwhite
159syn region nsisSectionGroupOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSectionGroupKwd
160syn match nsisSectionGroupKwd contained "/e\>"
161
162"STATEMENTS - functions (4.7.1)
163syn keyword nsisStatement contained Function FunctionEnd
Bram Moolenaar071d4272004-06-13 20:20:40 +0000164
165
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100166"STATEMENTS - LogicLib.nsh
167syn match nsisStatement "${If}"
168syn match nsisStatement "${IfNot}"
169syn match nsisStatement "${Unless}"
170syn match nsisStatement "${ElseIf}"
171syn match nsisStatement "${ElseIfNot}"
172syn match nsisStatement "${ElseUnless}"
173syn match nsisStatement "${Else}"
174syn match nsisStatement "${EndIf}"
175syn match nsisStatement "${EndUnless}"
176syn match nsisStatement "${AndIf}"
177syn match nsisStatement "${AndIfNot}"
178syn match nsisStatement "${AndUnless}"
179syn match nsisStatement "${OrIf}"
180syn match nsisStatement "${OrIfNot}"
181syn match nsisStatement "${OrUnless}"
182syn match nsisStatement "${IfThen}"
183syn match nsisStatement "${IfNotThen}"
184syn match nsisStatement "${||\?}" nextgroup=@nsisPseudoStatement skipwhite
185syn match nsisStatement "${IfCmd}" nextgroup=@nsisPseudoStatement skipwhite
186syn match nsisStatement "${Select}"
187syn match nsisStatement "${Case}"
188syn match nsisStatement "${Case[2-5]}"
189syn match nsisStatement "${CaseElse}"
190syn match nsisStatement "${Default}"
191syn match nsisStatement "${EndSelect}"
192syn match nsisStatement "${Switch}"
193syn match nsisStatement "${EndSwitch}"
194syn match nsisStatement "${Break}"
195syn match nsisStatement "${Do}"
196syn match nsisStatement "${DoWhile}"
197syn match nsisStatement "${DoUntil}"
198syn match nsisStatement "${ExitDo}"
199syn match nsisStatement "${Continue}"
200syn match nsisStatement "${Loop}"
201syn match nsisStatement "${LoopWhile}"
202syn match nsisStatement "${LoopUntil}"
203syn match nsisStatement "${For}"
204syn match nsisStatement "${ForEach}"
205syn match nsisStatement "${ExitFor}"
206syn match nsisStatement "${Next}"
207"STATEMENTS - Memento.nsh
208syn match nsisStatement "${MementoSection}"
209syn match nsisStatement "${MementoSectionEnd}"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000210
211
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100212"USER VARIABLES (4.2.1)
213syn keyword nsisInstruction contained Var nextgroup=nsisVarOpt skipwhite
214syn region nsisVarOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisVarKwd
215syn match nsisVarKwd contained "/GLOBAL\>"
216
217"INSTALLER ATTRIBUTES (4.8.1)
218syn keyword nsisAttribute contained Caption ChangeUI CheckBitmap CompletedText ComponentText
219syn keyword nsisAttribute contained DetailsButtonText DirText DirVar
220syn keyword nsisAttribute contained FileErrorText Icon InstallButtonText
221syn keyword nsisAttribute contained InstallDir InstProgressFlags
222syn keyword nsisAttribute contained LicenseData LicenseText
223syn keyword nsisAttribute contained MiscButtonText Name OutFile
224syn keyword nsisAttribute contained SpaceTexts SubCaption UninstallButtonText UninstallCaption
225syn keyword nsisAttribute contained UninstallIcon UninstallSubCaption UninstallText
226
227syn keyword nsisAttribute contained AddBrandingImage nextgroup=nsisAddBrandingImageOpt skipwhite
228syn region nsisAddBrandingImageOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisAddBrandingImageKwd
229syn keyword nsisAddBrandingImageKwd contained left right top bottom width height
230
231syn keyword nsisAttribute contained nextgroup=nsisBooleanOpt skipwhite
232 \ AllowRootDirInstall AutoCloseWindow
233
234syn keyword nsisAttribute contained BGFont nextgroup=nsisFontOpt skipwhite
235
236syn keyword nsisAttribute contained BGGradient nextgroup=nsisBGGradientOpt skipwhite
237syn region nsisBGGradientOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisBGGradientKwd
238syn keyword nsisBGGradientKwd contained off
239
240syn keyword nsisAttribute contained BrandingText nextgroup=nsisBrandingTextOpt skipwhite
241syn region nsisBrandingTextOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisBrandingTextKwd
242syn match nsisBrandingTextKwd contained "/TRIM\%(LEFT\|RIGHT\|CENTER\)\>"
243
244syn keyword nsisAttribute contained CRCCheck nextgroup=nsisCRCCheckOpt skipwhite
245syn region nsisCRCCheckOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisCRCCheckKwd
246syn keyword nsisCRCCheckKwd contained on off force
247
248syn keyword nsisAttribute contained DirVerify nextgroup=nsisDirVerifyOpt skipwhite
249syn region nsisDirVerifyOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisDirVerifyKwd
250syn keyword nsisDirVerifyKwd contained auto leave
251
252syn keyword nsisAttribute contained InstallColors nextgroup=nsisInstallColorsOpt skipwhite
253syn region nsisInstallColorsOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisInstallColorsKwd
254syn match nsisInstallColorsKwd contained "/windows\>"
255
256syn keyword nsisAttribute contained InstallDirRegKey nextgroup=nsisRegistryOpt skipwhite
257
258syn keyword nsisAttribute contained InstType nextgroup=nsisInstTypeOpt skipwhite
259syn region nsisInstTypeOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisInstTypeKwd
260syn match nsisInstTypeKwd contained "/\%(NOCUSTOM\|CUSTOMSTRING\|COMPONENTSONLYONCUSTOM\)\>"
261
262syn keyword nsisAttribute contained LicenseBkColor nextgroup=nsisLicenseBkColorOpt skipwhite
263syn region nsisLicenseBkColorOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisLicenseBkColorKwd
264syn match nsisLicenseBkColorKwd contained "/\%(gray\|windows\)\>"
265
266syn keyword nsisAttribute contained LicenseForceSelection nextgroup=nsisLicenseForceSelectionOpt skipwhite
267syn region nsisLicenseForceSelectionOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisLicenseForceSelectionKwd
268syn keyword nsisLicenseForceSelectionKwd contained checkbox radiobuttons off
269
270syn keyword nsisAttribute contained ManifestDPIAware nextgroup=nsisManifestDPIAwareOpt skipwhite
271syn region nsisManifestDPIAwareOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisManifestDPIAwareKwd
272syn keyword nsisManifestDPIAwareKwd contained notset true false
273
Bram Moolenaar079ba762021-10-23 12:08:41 +0100274syn keyword nsisAttribute contained ManifestLongPathAware nextgroup=nsisManifestLongPathAwareOpt skipwhite
275syn region nsisManifestLongPathAwareOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisManifestLongPathAwareKwd
276syn match nsisManifestLongPathAwareKwd contained "\<\%(notset\|true\|false\)\>"
277
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100278syn keyword nsisAttribute contained ManifestSupportedOS nextgroup=nsisManifestSupportedOSOpt skipwhite
279syn region nsisManifestSupportedOSOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisManifestSupportedOSKwd
280syn match nsisManifestSupportedOSKwd contained "\<\%(none\|all\|WinVista\|Win7\|Win8\|Win8\.1\|Win10\)\>"
281
Bram Moolenaar079ba762021-10-23 12:08:41 +0100282syn keyword nsisAttribute contained PEAddResource nextgroup=nsisPEAddResourceOpt skipwhite
283syn region nsisPEAddResourceOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisPEAddResourceKwd
284syn match nsisPEAddResourceKwd contained "/\%(OVERWRITE\|REPLACE\)\>"
285
286syn keyword nsisAttribute contained PERemoveResource nextgroup=nsisPERemoveResourceOpt skipwhite
287syn region nsisPERemoveResourceOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisPERemoveResourceKwd
288syn match nsisPERemoveResourceKwd contained "/NOERRORS\>"
289
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100290syn keyword nsisAttribute contained RequestExecutionLevel nextgroup=nsisRequestExecutionLevelOpt skipwhite
291syn region nsisRequestExecutionLevelOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisRequestExecutionLevelKwd
292syn keyword nsisRequestExecutionLevelKwd contained none user highest admin
293
294syn keyword nsisAttribute contained SetFont nextgroup=nsisLangOpt skipwhite
295
296syn keyword nsisAttribute contained nextgroup=nsisShowInstDetailsOpt skipwhite
297 \ ShowInstDetails ShowUninstDetails
298syn region nsisShowInstDetailsOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisShowInstDetailsKwd
299syn keyword nsisShowInstDetailsKwd contained hide show nevershow
300
301syn keyword nsisAttribute contained SilentInstall nextgroup=nsisSilentInstallOpt skipwhite
302syn region nsisSilentInstallOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSilentInstallKwd
303syn keyword nsisSilentInstallKwd contained normal silent silentlog
304
305syn keyword nsisAttribute contained SilentUnInstall nextgroup=nsisSilentUnInstallOpt skipwhite
306syn region nsisSilentUnInstallOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSilentUnInstallKwd
307syn keyword nsisSilentUnInstallKwd contained normal silent
308
309syn keyword nsisAttribute contained nextgroup=nsisOnOffOpt skipwhite
310 \ WindowIcon XPStyle
311
312"COMPILER FLAGS (4.8.2)
313syn keyword nsisCompiler contained nextgroup=nsisOnOffOpt skipwhite
314 \ AllowSkipFiles SetDatablockOptimize SetDateSave
315
316syn keyword nsisCompiler contained FileBufSize SetCompressorDictSize
317
318syn keyword nsisCompiler contained SetCompress nextgroup=nsisSetCompressOpt skipwhite
319syn region nsisSetCompressOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSetCompressKwd
320syn keyword nsisSetCompressKwd contained auto force off
321
322syn keyword nsisCompiler contained SetCompressor nextgroup=nsisSetCompressorOpt skipwhite
323syn region nsisSetCompressorOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSetCompressorKwd
324syn keyword nsisSetCompressorKwd contained zlib bzip2 lzma
325syn match nsisSetCompressorKwd contained "/\%(SOLID\|FINAL\)"
326
327syn keyword nsisCompiler contained SetOverwrite nextgroup=nsisSetOverwriteOpt skipwhite
328syn region nsisSetOverwriteOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSetOverwriteKwd
329syn keyword nsisSetOverwriteKwd contained on off try ifnewer ifdiff lastused
330
331syn keyword nsisCompiler contained Unicode nextgroup=nsisBooleanOpt skipwhite
332
333"VERSION INFORMATION (4.8.3)
334syn keyword nsisVersionInfo contained VIAddVersionKey nextgroup=nsisLangOpt skipwhite
335
336syn keyword nsisVersionInfo contained VIProductVersion VIFileVersion
337
338
339"FUNCTIONS - basic (4.9.1)
340syn keyword nsisInstruction contained Delete Rename nextgroup=nsisDeleteOpt skipwhite
341syn region nsisDeleteOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisDeleteKwd
342syn match nsisDeleteKwd contained "/REBOOTOK\>"
343
344syn keyword nsisInstruction contained Exec ExecWait SetOutPath
345
346syn keyword nsisInstruction contained ExecShell ExecShellWait nextgroup=nsisExecShellOpt skipwhite
347syn region nsisExecShellOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisExecShellKwd
348syn keyword nsisExecShellKwd contained SW_SHOWDEFAULT SW_SHOWNORMAL SW_SHOWMAXIMIZED SW_SHOWMINIMIZED SW_HIDE
349syn match nsisExecShellKwd contained "/INVOKEIDLIST\>"
350
351syn keyword nsisInstruction contained File nextgroup=nsisFileOpt skipwhite
352syn region nsisFileOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisFileKwd
353syn match nsisFileKwd contained "/\%(nonfatal\|[arx]\|oname\)\>"
354
355syn keyword nsisInstruction contained ReserveFile nextgroup=nsisReserveFileOpt skipwhite
356syn region nsisReserveFileOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisReserveFileKwd
357syn match nsisReserveFileKwd contained "/\%(nonfatal\|[rx]\|plugin\)\>"
358
359syn keyword nsisInstruction contained RMDir nextgroup=nsisRMDirOpt skipwhite
360syn region nsisRMDirOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisRMDirKwd
361syn match nsisRMDirKwd contained "/\%(REBOOTOK\|r\)\>"
362
363
364"FUNCTIONS - registry & ini (4.9.2)
365syn keyword nsisInstruction contained DeleteINISec DeleteINIStr FlushINI ReadINIStr WriteINIStr
366syn keyword nsisInstruction contained ExpandEnvStrings ReadEnvStr
367
368syn keyword nsisInstruction contained DeleteRegKey nextgroup=nsisDeleteRegKeyOpt skipwhite
369syn region nsisDeleteRegKeyOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisDeleteRegKeyKwd,nsisRegistry
Bram Moolenaar079ba762021-10-23 12:08:41 +0100370syn match nsisDeleteRegKeyKwd contained "/\%(ifempty\|ifnosubkeys\|ifnovalues\)\>"
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100371
372syn keyword nsisInstruction contained nextgroup=nsisRegistryOpt skipwhite
373 \ DeleteRegValue EnumRegKey EnumRegValue ReadRegDWORD ReadRegStr WriteRegBin WriteRegDWORD WriteRegExpandStr WriteRegStr
374syn region nsisRegistryOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisRegistry
375
376syn keyword nsisInstruction contained WriteRegMultiStr nextgroup=nsisWriteRegMultiStrOpt skipwhite
377syn region nsisWriteRegMultiStrOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisRegistry,nsisWriteRegMultiStrKwd
378syn match nsisWriteRegMultiStrKwd contained "/REGEDIT5\>"
379
380syn keyword nsisInstruction contained SetRegView nextgroup=nsisSetRegViewOpt skipwhite
381syn region nsisSetRegViewOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSetRegViewKwd
382syn keyword nsisSetRegViewKwd contained default lastused
383
384"FUNCTIONS - general purpose (4.9.3)
Bram Moolenaar079ba762021-10-23 12:08:41 +0100385syn keyword nsisInstruction contained CallInstDLL CreateDirectory GetWinVer
386syn keyword nsisInstruction contained GetFileTime GetFileTimeLocal GetKnownFolderPath
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100387syn keyword nsisInstruction contained GetTempFileName SearchPath RegDLL UnRegDLL
388
389syn keyword nsisInstruction contained CopyFiles nextgroup=nsisCopyFilesOpt skipwhite
390syn region nsisCopyFilesOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisCopyFilesKwd
391syn match nsisCopyFilesKwd contained "/\%(SILENT\|FILESONLY\)\>"
392
393syn keyword nsisInstruction contained CreateShortcut nextgroup=nsisCreateShortcutOpt skipwhite
394syn region nsisCreateShortcutOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisCreateShortcutKwd
395syn match nsisCreateShortcutKwd contained "/NoWorkingDir\>"
396
Bram Moolenaard13166e2022-11-18 21:49:57 +0000397syn keyword nsisInstruction contained GetWinVer nextgroup=nsisGetWinVerOpt skipwhite
398syn region nsisGetWinVerOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisGetWinVerKwd
399syn keyword nsisGetWinVerKwd contained Major Minor Build ServicePack
400
Bram Moolenaar079ba762021-10-23 12:08:41 +0100401syn keyword nsisInstruction contained GetDLLVersion GetDLLVersionLocal nextgroup=nsisGetDLLVersionOpt skipwhite
Bram Moolenaard13166e2022-11-18 21:49:57 +0000402syn region nsisGetDLLVersionOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisGetDLLVersionKwd
403syn match nsisGetDLLVersionKwd contained "/ProductVersion\>"
Bram Moolenaar079ba762021-10-23 12:08:41 +0100404
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100405syn keyword nsisInstruction contained GetFullPathName nextgroup=nsisGetFullPathNameOpt skipwhite
406syn region nsisGetFullPathNameOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisGetFullPathNameKwd
407syn match nsisGetFullPathNameKwd contained "/SHORT\>"
408
409syn keyword nsisInstruction contained SetFileAttributes nextgroup=nsisSetFileAttributesOpt skipwhite
410syn region nsisSetFileAttributesOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisFileAttrib
411syn keyword nsisFileAttrib contained NORMAL ARCHIVE HIDDEN OFFLINE READONLY SYSTEM TEMPORARY
412syn keyword nsisFileAttrib contained FILE_ATTRIBUTE_NORMAL FILE_ATTRIBUTE_ARCHIVE FILE_ATTRIBUTE_HIDDEN
413syn keyword nsisFileAttrib contained FILE_ATTRIBUTE_OFFLINE FILE_ATTRIBUTE_READONLY FILE_ATTRIBUTE_SYSTEM
414syn keyword nsisFileAttrib contained FILE_ATTRIBUTE_TEMPORARY
415
416"FUNCTIONS - Flow Control (4.9.4)
417syn keyword nsisInstruction contained Abort Call ClearErrors GetCurrentAddress
418syn keyword nsisInstruction contained GetFunctionAddress GetLabelAddress Goto
419syn keyword nsisInstruction contained IfAbort IfErrors IfFileExists IfRebootFlag IfSilent
Bram Moolenaar079ba762021-10-23 12:08:41 +0100420syn keyword nsisInstruction contained IfShellVarContextAll IfRtlLanguage
Bram Moolenaareb3dc872018-05-13 22:34:24 +0200421syn keyword nsisInstruction contained IntCmp IntCmpU Int64Cmp Int64CmpU IntPtrCmp IntPtrCmpU
422syn keyword nsisInstruction contained Return Quit SetErrors StrCmp StrCmpS
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100423
424syn keyword nsisInstruction contained MessageBox nextgroup=nsisMessageBoxOpt skipwhite
425syn region nsisMessageBoxOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisMessageBox
426syn keyword nsisMessageBox contained MB_OK MB_OKCANCEL MB_ABORTRETRYIGNORE MB_RETRYCANCEL MB_YESNO MB_YESNOCANCEL
427syn keyword nsisMessageBox contained MB_ICONEXCLAMATION MB_ICONINFORMATION MB_ICONQUESTION MB_ICONSTOP MB_USERICON
428syn keyword nsisMessageBox contained MB_TOPMOST MB_SETFOREGROUND MB_RIGHT MB_RTLREADING
429syn keyword nsisMessageBox contained MB_DEFBUTTON1 MB_DEFBUTTON2 MB_DEFBUTTON3 MB_DEFBUTTON4
430syn keyword nsisMessageBox contained IDABORT IDCANCEL IDIGNORE IDNO IDOK IDRETRY IDYES
431syn match nsisMessageBox contained "/SD\>"
432
433"FUNCTIONS - File and directory i/o instructions (4.9.5)
434syn keyword nsisInstruction contained FileClose FileOpen FileRead FileReadUTF16LE
435syn keyword nsisInstruction contained FileReadByte FileReadWord FileSeek FileWrite
436syn keyword nsisInstruction contained FileWriteByte FileWriteWord
437syn keyword nsisInstruction contained FindClose FindFirst FindNext
438
439syn keyword nsisInstruction contained FileWriteUTF16LE nextgroup=nsisFileWriteUTF16LEOpt skipwhite
440syn region nsisFileWriteUTF16LEOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisFileWriteUTF16LEKwd
441syn match nsisFileWriteUTF16LEKwd contained "/BOM\>"
442
443"FUNCTIONS - Uninstaller instructions (4.9.6)
444syn keyword nsisInstruction contained WriteUninstaller
445
446"FUNCTIONS - Misc instructions (4.9.7)
447syn keyword nsisInstruction contained GetErrorLevel GetInstDirError InitPluginsDir Nop
448syn keyword nsisInstruction contained SetErrorLevel Sleep
449
450syn keyword nsisInstruction contained SetShellVarContext nextgroup=nsisSetShellVarContextOpt skipwhite
451syn region nsisSetShellVarContextOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSetShellVarContextKwd
452syn keyword nsisSetShellVarContextKwd contained current all
453
454"FUNCTIONS - String manipulation support (4.9.8)
455syn keyword nsisInstruction contained StrCpy StrLen
456
457"FUNCTIONS - Stack support (4.9.9)
458syn keyword nsisInstruction contained Exch Push Pop
459
460"FUNCTIONS - Integer manipulation support (4.9.10)
Bram Moolenaareb3dc872018-05-13 22:34:24 +0200461syn keyword nsisInstruction contained IntFmt Int64Fmt IntOp IntPtrOp
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100462
463"FUNCTIONS - Rebooting support (4.9.11)
464syn keyword nsisInstruction contained Reboot SetRebootFlag
465
466"FUNCTIONS - Install logging instructions (4.9.12)
467syn keyword nsisInstruction contained LogSet nextgroup=nsisOnOffOpt skipwhite
468syn keyword nsisInstruction contained LogText
469
470"FUNCTIONS - Section management instructions (4.9.13)
471syn keyword nsisInstruction contained SectionSetFlags SectionGetFlags SectionSetText
472syn keyword nsisInstruction contained SectionGetText SectionSetInstTypes SectionGetInstTypes
473syn keyword nsisInstruction contained SectionSetSize SectionGetSize SetCurInstType GetCurInstType
474syn keyword nsisInstruction contained InstTypeSetText InstTypeGetText
475
476"FUNCTIONS - User Interface Instructions (4.9.14)
477syn keyword nsisInstruction contained BringToFront DetailPrint EnableWindow
478syn keyword nsisInstruction contained FindWindow GetDlgItem HideWindow IsWindow
479syn keyword nsisInstruction contained ShowWindow
480
481syn keyword nsisInstruction contained CreateFont nextgroup=nsisFontOpt skipwhite
482
483syn keyword nsisInstruction contained nextgroup=nsisBooleanOpt skipwhite
484 \ LockWindow SetAutoClose
485
Bram Moolenaar079ba762021-10-23 12:08:41 +0100486syn keyword nsisInstruction contained LoadAndSetImage nextgroup=nsisLoadAndSetImageOpt skipwhite
487syn region nsisLoadAndSetImageOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisLoadAndSetImageKwd
488syn match nsisLoadAndSetImageKwd contained "/\%(EXERESOURCE\|STRINGID\|RESIZETOFIT\%(WIDTH\|HEIGHT\)\)\>"
489
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100490syn keyword nsisInstruction contained SendMessage nextgroup=nsisSendMessageOpt skipwhite
491syn region nsisSendMessageOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSendMessageKwd
492syn match nsisSendMessageKwd contained "/TIMEOUT\>"
493
494syn keyword nsisInstruction contained SetBrandingImage nextgroup=nsisSetBrandingImageOpt skipwhite
495syn region nsisSetBrandingImageOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSetBrandingImageKwd
496syn match nsisSetBrandingImageKwd contained "/\%(IMGID\|RESIZETOFIT\)\>"
497
498syn keyword nsisInstruction contained SetDetailsView nextgroup=nsisSetDetailsViewOpt skipwhite
499syn region nsisSetDetailsViewOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSetDetailsViewKwd
500syn keyword nsisSetDetailsViewKwd contained show hide
501
502syn keyword nsisInstruction contained SetDetailsPrint nextgroup=nsisSetDetailsPrintOpt skipwhite
503syn region nsisSetDetailsPrintOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSetDetailsPrintKwd
504syn keyword nsisSetDetailsPrintKwd contained none listonly textonly both lastused
505
506syn keyword nsisInstruction contained SetCtlColors nextgroup=nsisSetCtlColorsOpt skipwhite
507syn region nsisSetCtlColorsOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSetCtlColorsKwd
508syn match nsisSetCtlColorsKwd contained "/BRANDING\>"
509
510syn keyword nsisInstruction contained SetSilent nextgroup=nsisSetSilentOpt skipwhite
511syn region nsisSetSilentOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSetSilentKwd
512syn keyword nsisSetSilentKwd contained silent normal
513
514
515"FUNCTIONS - Multiple Languages Instructions (4.9.15)
516syn keyword nsisInstruction contained LoadLanguageFile LangString LicenseLangString
517
518
519"SPECIAL FUNCTIONS - install (4.7.2.1)
520syn match nsisCallback "\.onGUIInit"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000521syn match nsisCallback "\.onInit"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000522syn match nsisCallback "\.onInstFailed"
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100523syn match nsisCallback "\.onInstSuccess"
524syn match nsisCallback "\.onGUIEnd"
525syn match nsisCallback "\.onMouseOverSection"
526syn match nsisCallback "\.onRebootFailed"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000527syn match nsisCallback "\.onSelChange"
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100528syn match nsisCallback "\.onUserAbort"
529syn match nsisCallback "\.onVerifyInstDir"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000530
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100531"SPECIAL FUNCTIONS - uninstall (4.7.2.2)
532syn match nsisCallback "un\.onGUIInit"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000533syn match nsisCallback "un\.onInit"
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100534syn match nsisCallback "un\.onUninstFailed"
535syn match nsisCallback "un\.onUninstSuccess"
536syn match nsisCallback "un\.onGUIEnd"
537syn match nsisCallback "un\.onRebootFailed"
538syn match nsisCallback "un\.onSelChange"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000539syn match nsisCallback "un\.onUserAbort"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000540
541
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100542"COMPILER UTILITY (5.1)
543syn match nsisInclude contained "!include\>" nextgroup=nsisIncludeOpt skipwhite
544syn region nsisIncludeOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisIncludeKwd
545syn match nsisIncludeKwd contained "/\%(NONFATAL\|CHARSET\)\>"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000546
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100547syn match nsisSystem contained "!addincludedir\>"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000548
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100549syn match nsisSystem contained "!addplugindir\>" nextgroup=nsisAddplugindirOpt skipwhite
550syn region nsisAddplugindirOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisAddplugindirKwd
551syn match nsisAddplugindirKwd contained "/\%(x86-ansi\|x86-unicode\)\>"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000552
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100553syn match nsisSystem contained "!appendfile\>" nextgroup=nsisAppendfileOpt skipwhite
554syn region nsisAppendfileOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisAppendfileKwd
555syn match nsisAppendfileKwd contained "/\%(CHARSET\|RawNL\)\>"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000556
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100557syn match nsisSystem contained "!cd\>"
558
559syn match nsisSystem contained "!delfile\>" nextgroup=nsisDelfileOpt skipwhite
560syn region nsisDelfileOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisDelfileKwd
561syn match nsisDelfileKwd contained "/nonfatal\>"
562
563syn match nsisSystem contained "!echo\>"
564syn match nsisSystem contained "!error\>"
565syn match nsisSystem contained "!execute\>"
566syn match nsisSystem contained "!makensis\>"
567syn match nsisSystem contained "!packhdr\>"
568syn match nsisSystem contained "!finalize\>"
Bram Moolenaard13166e2022-11-18 21:49:57 +0000569syn match nsisSystem contained "!uninstfinalize\>"
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100570syn match nsisSystem contained "!system\>"
571syn match nsisSystem contained "!tempfile\>"
Bram Moolenaard13166e2022-11-18 21:49:57 +0000572
573" Add 'P' to avoid conflicts with nsisGetDLLVersionOpt. ('P' for preprocessor.)
574syn match nsisSystem contained "!getdllversion\>" nextgroup=nsisPGetdllversionOpt skipwhite
575syn region nsisPGetdllversionOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisPGetdllversionKwd
576syn match nsisPGetdllversionKwd contained "/\%(noerrors\|packed\|productversion\)\>"
577
578syn match nsisSystem contained "!gettlbversion\>" nextgroup=nsisPGettlbversionOpt skipwhite
579syn region nsisPGettlbversionOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisPGettlbversionKwd
580syn match nsisPGettlbversionKwd contained "/\%(noerrors\|packed\)\>"
581
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100582syn match nsisSystem contained "!warning\>"
583
584syn match nsisSystem contained "!pragma\>" nextgroup=nsisPragmaOpt skipwhite
585syn region nsisPragmaOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisPragmaKwd
586syn keyword nsisPragmaKwd contained enable disable default push pop
587
588syn match nsisSystem contained "!verbose\>" nextgroup=nsisVerboseOpt skipwhite
589syn region nsisVerboseOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisVerboseKwd
590syn keyword nsisVerboseKwd contained push pop
591
592"PREPROCESSOR (5.4)
593syn match nsisDefine contained "!define\>" nextgroup=nsisDefineOpt skipwhite
594syn region nsisDefineOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisDefineKwd
Bram Moolenaar079ba762021-10-23 12:08:41 +0100595syn match nsisDefineKwd contained "/\%(ifndef\|redef\|date\|utcdate\|file\|intfmt\|math\)\>"
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100596
Bram Moolenaard13166e2022-11-18 21:49:57 +0000597syn match nsisDefine contained "!undef\>" nextgroup=nsisUndefineOpt skipwhite
598syn region nsisUndefineOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisUndefineKwd
599syn match nsisUndefineKwd contained "/noerrors\>"
600
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100601syn match nsisPreCondit contained "!ifdef\>"
602syn match nsisPreCondit contained "!ifndef\>"
603
604syn match nsisPreCondit contained "!if\>" nextgroup=nsisIfOpt skipwhite
605syn region nsisIfOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisIfKwd
606syn match nsisIfKwd contained "/FileExists\>"
607
608syn match nsisPreCondit contained "!ifmacrodef\>"
609syn match nsisPreCondit contained "!ifmacrondef\>"
610syn match nsisPreCondit contained "!else\>"
611syn match nsisPreCondit contained "!endif\>"
612syn match nsisMacro contained "!insertmacro\>"
613syn match nsisMacro contained "!macro\>"
614syn match nsisMacro contained "!macroend\>"
615syn match nsisMacro contained "!macroundef\>"
616
617syn match nsisMacro contained "!searchparse\>" nextgroup=nsisSearchparseOpt skipwhite
618syn region nsisSearchparseOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSearchparseKwd
619syn match nsisSearchparseKwd contained "/\%(ignorecase\|noerrors\|file\)\>"
620
621syn match nsisMacro contained "!searchreplace\>" nextgroup=nsisSearchreplaceOpt skipwhite
622syn region nsisSearchreplaceOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSearchreplaceKwd
623syn match nsisSearchreplaceKwd contained "/ignorecase\>"
624
Bram Moolenaar071d4272004-06-13 20:20:40 +0000625
626
627" Define the default highlighting.
Bram Moolenaar89bcfda2016-08-30 23:26:57 +0200628" Only when an item doesn't have highlighting yet
Bram Moolenaar071d4272004-06-13 20:20:40 +0000629
Bram Moolenaarf37506f2016-08-31 22:22:10 +0200630hi def link nsisInstruction Function
631hi def link nsisComment Comment
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100632hi def link nsisFirstComment Comment
633hi def link nsisLocalLabel Label
Bram Moolenaarf37506f2016-08-31 22:22:10 +0200634hi def link nsisGlobalLabel Label
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100635hi def link nsisStatement Statement
Bram Moolenaarf37506f2016-08-31 22:22:10 +0200636hi def link nsisString String
637hi def link nsisBoolean Boolean
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100638hi def link nsisOnOff Boolean
639hi def link nsisFontKwd Constant
640hi def link nsisLangKwd Constant
641hi def link nsisPageKwd Constant
642hi def link nsisPageExKwd Constant
643hi def link nsisSectionKwd Constant
644hi def link nsisSectionInKwd Constant
645hi def link nsisSectionGroupKwd Constant
646hi def link nsisVarKwd Constant
647hi def link nsisAddBrandingImageKwd Constant
648hi def link nsisBGGradientKwd Constant
649hi def link nsisBrandingTextKwd Constant
650hi def link nsisCRCCheckKwd Constant
651hi def link nsisDirVerifyKwd Constant
652hi def link nsisInstallColorsKwd Constant
653hi def link nsisInstTypeKwd Constant
654hi def link nsisLicenseBkColorKwd Constant
655hi def link nsisLicenseForceSelectionKwd Constant
656hi def link nsisManifestDPIAwareKwd Constant
Bram Moolenaar079ba762021-10-23 12:08:41 +0100657hi def link nsisManifestLongPathAwareKwd Constant
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100658hi def link nsisManifestSupportedOSKwd Constant
Bram Moolenaar079ba762021-10-23 12:08:41 +0100659hi def link nsisPEAddResourceKwd Constant
660hi def link nsisPERemoveResourceKwd Constant
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100661hi def link nsisRequestExecutionLevelKwd Constant
662hi def link nsisShowInstDetailsKwd Constant
663hi def link nsisSilentInstallKwd Constant
664hi def link nsisSilentUnInstallKwd Constant
665hi def link nsisSetCompressKwd Constant
666hi def link nsisSetCompressorKwd Constant
667hi def link nsisSetOverwriteKwd Constant
668hi def link nsisDeleteKwd Constant
669hi def link nsisExecShellKwd Constant
670hi def link nsisFileKwd Constant
671hi def link nsisReserveFileKwd Constant
672hi def link nsisRMDirKwd Constant
673hi def link nsisDeleteRegKeyKwd Constant
674hi def link nsisWriteRegMultiStrKwd Constant
675hi def link nsisSetRegViewKwd Constant
676hi def link nsisCopyFilesKwd Constant
677hi def link nsisCreateShortcutKwd Constant
Bram Moolenaard13166e2022-11-18 21:49:57 +0000678hi def link nsisGetWinVerKwd Constant
Bram Moolenaar079ba762021-10-23 12:08:41 +0100679hi def link nsisGetDLLVersionKwd Constant
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100680hi def link nsisGetFullPathNameKwd Constant
681hi def link nsisFileAttrib Constant
682hi def link nsisMessageBox Constant
683hi def link nsisFileWriteUTF16LEKwd Constant
684hi def link nsisSetShellVarContextKwd Constant
Bram Moolenaar079ba762021-10-23 12:08:41 +0100685hi def link nsisLoadAndSetImageKwd Constant
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100686hi def link nsisSendMessageKwd Constant
687hi def link nsisSetBrandingImageKwd Constant
688hi def link nsisSetDetailsViewKwd Constant
689hi def link nsisSetDetailsPrintKwd Constant
690hi def link nsisSetCtlColorsKwd Constant
691hi def link nsisSetSilentKwd Constant
692hi def link nsisRegistry Identifier
Bram Moolenaarf37506f2016-08-31 22:22:10 +0200693hi def link nsisNumber Number
694hi def link nsisError Error
695hi def link nsisUserVar Identifier
696hi def link nsisSysVar Identifier
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100697hi def link nsisAttribute Type
698hi def link nsisCompiler Type
699hi def link nsisVersionInfo Type
Bram Moolenaarf37506f2016-08-31 22:22:10 +0200700hi def link nsisTodo Todo
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100701hi def link nsisCallback Identifier
Bram Moolenaar89bcfda2016-08-30 23:26:57 +0200702" preprocessor commands
Bram Moolenaarf37506f2016-08-31 22:22:10 +0200703hi def link nsisPreprocSubst PreProc
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100704hi def link nsisPreprocLangStr PreProc
705hi def link nsisPreprocEnvVar PreProc
Bram Moolenaarf37506f2016-08-31 22:22:10 +0200706hi def link nsisDefine Define
707hi def link nsisMacro Macro
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100708hi def link nsisPreCondit PreCondit
Bram Moolenaarf37506f2016-08-31 22:22:10 +0200709hi def link nsisInclude Include
710hi def link nsisSystem PreProc
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100711hi def link nsisLineContinuation Special
712hi def link nsisIncludeKwd Constant
713hi def link nsisAddplugindirKwd Constant
714hi def link nsisAppendfileKwd Constant
715hi def link nsisDelfileKwd Constant
Bram Moolenaard13166e2022-11-18 21:49:57 +0000716hi def link nsisPGetdllversionKwd Constant
717hi def link nsisPGettlbversionKwd Constant
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100718hi def link nsisPragmaKwd Constant
719hi def link nsisVerboseKwd Constant
720hi def link nsisDefineKwd Constant
Bram Moolenaard13166e2022-11-18 21:49:57 +0000721hi def link nsisUndefineKwd Constant
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100722hi def link nsisIfKwd Constant
723hi def link nsisSearchparseKwd Constant
724hi def link nsisSearchreplaceKwd Constant
Bram Moolenaar071d4272004-06-13 20:20:40 +0000725
Bram Moolenaar071d4272004-06-13 20:20:40 +0000726
727let b:current_syntax = "nsis"
728
Bram Moolenaar40962ec2018-01-28 22:47:25 +0100729let &cpo = s:cpo_save
730unlet s:cpo_save