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