blob: e58c618b7f6e924f8088fa8853b418254dafc4df [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim syntax file
Bram Moolenaar21cf8232004-07-16 20:18:37 +00002" Language: Inno Setup File (iss file) and My InnoSetup extension
3" Maintainer: Jason Mills (jmills@cs.mun.ca)
4" Previous Maintainer: Dominique Stéphan (dominique@mggen.com)
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00005" Last Change: 2004 Dec 14
6"
7" Todo:
8" - The paramter String: is matched as flag string (because of case ignore).
9" - Pascal scripting syntax is not recognized.
10" - Embedded double quotes confuse string matches. e.g. "asfd""asfa"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020012" quit when a syntax file was already loaded
13if exists("b:current_syntax")
Bram Moolenaar071d4272004-06-13 20:20:40 +000014 finish
15endif
16
17" shut case off
18syn case ignore
19
Bram Moolenaar21cf8232004-07-16 20:18:37 +000020" Preprocessor
21syn region issPreProc start="^\s*#" end="$"
22
Bram Moolenaar071d4272004-06-13 20:20:40 +000023" Section
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000024syn region issSection start="\[" end="\]"
Bram Moolenaar071d4272004-06-13 20:20:40 +000025
26" Label in the [Setup] Section
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000027syn match issDirective "^[^=]\+="
Bram Moolenaar071d4272004-06-13 20:20:40 +000028
29" URL
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000030syn match issURL "http[s]\=:\/\/.*$"
Bram Moolenaar071d4272004-06-13 20:20:40 +000031
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000032" Parameters used for any section.
33" syn match issParam"[^: ]\+:"
34syn match issParam "Name:"
35syn match issParam "MinVersion:\|OnlyBelowVersion:\|Languages:"
36syn match issParam "Source:\|DestDir:\|DestName:\|CopyMode:"
37syn match issParam "Attribs:\|Permissions:\|FontInstall:\|Flags:"
38syn match issParam "FileName:\|Parameters:\|WorkingDir:\|HotKey:\|Comment:"
39syn match issParam "IconFilename:\|IconIndex:"
40syn match issParam "Section:\|Key:\|String:"
41syn match issParam "Root:\|SubKey:\|ValueType:\|ValueName:\|ValueData:"
42syn match issParam "RunOnceId:"
43syn match issParam "Type:\|Excludes:"
44syn match issParam "Components:\|Description:\|GroupDescription:\|Types:\|ExtraDiskSpaceRequired:"
45syn match issParam "StatusMsg:\|RunOnceId:\|Tasks:"
46syn match issParam "MessagesFile:\|LicenseFile:\|InfoBeforeFile:\|InfoAfterFile:"
Bram Moolenaar071d4272004-06-13 20:20:40 +000047
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000048syn match issComment "^\s*;.*$"
Bram Moolenaar071d4272004-06-13 20:20:40 +000049
50" folder constant
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000051syn match issFolder "{[^{]*}"
Bram Moolenaar071d4272004-06-13 20:20:40 +000052
53" string
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000054syn region issString start=+"+ end=+"+ contains=issFolder
Bram Moolenaar071d4272004-06-13 20:20:40 +000055
56" [Dirs]
57syn keyword issDirsFlags deleteafterinstall uninsalwaysuninstall uninsneveruninstall
58
59" [Files]
Bram Moolenaar8299df92004-07-10 09:47:34 +000060syn keyword issFilesCopyMode normal onlyifdoesntexist alwaysoverwrite alwaysskipifsameorolder dontcopy
Bram Moolenaar071d4272004-06-13 20:20:40 +000061syn keyword issFilesAttribs readonly hidden system
Bram Moolenaar8299df92004-07-10 09:47:34 +000062syn keyword issFilesPermissions full modify readexec
63syn keyword issFilesFlags allowunsafefiles comparetimestampalso confirmoverwrite deleteafterinstall
64syn keyword issFilesFlags dontcopy dontverifychecksum external fontisnttruetype ignoreversion
65syn keyword issFilesFlags isreadme onlyifdestfileexists onlyifdoesntexist overwritereadonly
66syn keyword issFilesFlags promptifolder recursesubdirs regserver regtypelib restartreplace
67syn keyword issFilesFlags sharedfile skipifsourcedoesntexist sortfilesbyextension touch
68syn keyword issFilesFlags uninsremovereadonly uninsrestartdelete uninsneveruninstall
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000069syn keyword issFilesFlags replacesameversion nocompression noencryption noregerror
70
Bram Moolenaar071d4272004-06-13 20:20:40 +000071
72" [Icons]
Bram Moolenaar8299df92004-07-10 09:47:34 +000073syn keyword issIconsFlags closeonexit createonlyiffileexists dontcloseonexit
74syn keyword issIconsFlags runmaximized runminimized uninsneveruninstall useapppaths
Bram Moolenaar071d4272004-06-13 20:20:40 +000075
76" [INI]
77syn keyword issINIFlags createkeyifdoesntexist uninsdeleteentry uninsdeletesection uninsdeletesectionifempty
78
79" [Registry]
80syn keyword issRegRootKey HKCR HKCU HKLM HKU HKCC
81syn keyword issRegValueType none string expandsz multisz dword binary
Bram Moolenaar8299df92004-07-10 09:47:34 +000082syn keyword issRegFlags createvalueifdoesntexist deletekey deletevalue dontcreatekey
83syn keyword issRegFlags preservestringtype noerror uninsclearvalue
84syn keyword issRegFlags uninsdeletekey uninsdeletekeyifempty uninsdeletevalue
Bram Moolenaar071d4272004-06-13 20:20:40 +000085
86" [Run] and [UninstallRun]
Bram Moolenaar8299df92004-07-10 09:47:34 +000087syn keyword issRunFlags hidewizard nowait postinstall runhidden runmaximized
88syn keyword issRunFlags runminimized shellexec skipifdoesntexist skipifnotsilent
89syn keyword issRunFlags skipifsilent unchecked waituntilidle
Bram Moolenaar071d4272004-06-13 20:20:40 +000090
91" [Types]
92syn keyword issTypesFlags iscustom
93
94" [Components]
Bram Moolenaar8299df92004-07-10 09:47:34 +000095syn keyword issComponentsFlags dontinheritcheck exclusive fixed restart disablenouninstallwarning
Bram Moolenaar071d4272004-06-13 20:20:40 +000096
97" [UninstallDelete] and [InstallDelete]
98syn keyword issInstallDeleteType files filesandordirs dirifempty
99
Bram Moolenaar8299df92004-07-10 09:47:34 +0000100" [Tasks]
101syn keyword issTasksFlags checkedonce dontinheritcheck exclusive restart unchecked
102
Bram Moolenaar071d4272004-06-13 20:20:40 +0000103
104" Define the default highlighting.
Bram Moolenaar89bcfda2016-08-30 23:26:57 +0200105" Only when an item doesn't have highlighting yet
Bram Moolenaar071d4272004-06-13 20:20:40 +0000106
Bram Moolenaar89bcfda2016-08-30 23:26:57 +0200107" The default methods for highlighting. Can be overridden later
Bram Moolenaarf37506f2016-08-31 22:22:10 +0200108hi def link issSection Special
109hi def link issComment Comment
110hi def link issDirective Type
111hi def link issParam Type
112hi def link issFolder Special
113hi def link issString String
114hi def link issURL Include
115hi def link issPreProc PreProc
Bram Moolenaar071d4272004-06-13 20:20:40 +0000116
Bram Moolenaarf37506f2016-08-31 22:22:10 +0200117hi def link issDirsFlags Keyword
118hi def link issFilesCopyMode Keyword
119hi def link issFilesAttribs Keyword
120hi def link issFilesPermissions Keyword
121hi def link issFilesFlags Keyword
122hi def link issIconsFlags Keyword
123hi def link issINIFlags Keyword
124hi def link issRegRootKey Keyword
125hi def link issRegValueType Keyword
126hi def link issRegFlags Keyword
127hi def link issRunFlags Keyword
128hi def link issTypesFlags Keyword
129hi def link issComponentsFlags Keyword
130hi def link issInstallDeleteType Keyword
131hi def link issTasksFlags Keyword
Bram Moolenaar071d4272004-06-13 20:20:40 +0000132
Bram Moolenaar071d4272004-06-13 20:20:40 +0000133
134let b:current_syntax = "iss"
135
136" vim:ts=8