xref: /vim-8.2.3635/runtime/syntax/iss.vim (revision 6c391a74)
1" Vim syntax file
2" Language:             Inno Setup File (iss file) and My InnoSetup extension
3" Maintainer:           Jason Mills ([email protected])
4" Previous Maintainer:  Dominique Stéphan ([email protected])
5" Last Change:          2021 Aug 30
6"
7" Todo:
8"  - The parameter 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"
11
12" quit when a syntax file was already loaded
13if exists("b:current_syntax")
14  finish
15endif
16
17" shut case off
18syn case ignore
19
20" Preprocessor
21syn region issPreProc start="^\s*#" end="$"
22
23" Section
24syn region issSection	start="\[" end="\]"
25
26" Label in the [Setup] Section
27syn match  issDirective	"^[^=]\+="
28
29" URL
30syn match  issURL	"http[s]\=:\/\/.*$"
31
32" 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:"
47
48syn match  issComment	"^\s*;.*$" contains=@Spell
49
50" folder constant
51syn match  issFolder	"{[^{]*}" contains=@NoSpell
52
53" string
54syn region issString	start=+"+ end=+"+ contains=issFolder,@Spell
55
56" [Dirs]
57syn keyword issDirsFlags deleteafterinstall uninsalwaysuninstall uninsneveruninstall
58
59" [Files]
60syn keyword issFilesCopyMode normal onlyifdoesntexist alwaysoverwrite alwaysskipifsameorolder dontcopy
61syn keyword issFilesAttribs readonly hidden system
62syn 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
69syn keyword issFilesFlags replacesameversion nocompression noencryption noregerror
70
71
72" [Icons]
73syn keyword issIconsFlags closeonexit createonlyiffileexists dontcloseonexit
74syn keyword issIconsFlags runmaximized runminimized uninsneveruninstall useapppaths
75
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
82syn keyword issRegFlags createvalueifdoesntexist deletekey deletevalue dontcreatekey
83syn keyword issRegFlags preservestringtype noerror uninsclearvalue
84syn keyword issRegFlags uninsdeletekey uninsdeletekeyifempty uninsdeletevalue
85
86" [Run] and [UninstallRun]
87syn keyword issRunFlags hidewizard nowait postinstall runhidden runmaximized
88syn keyword issRunFlags runminimized shellexec skipifdoesntexist skipifnotsilent
89syn keyword issRunFlags skipifsilent unchecked waituntilidle
90
91" [Types]
92syn keyword issTypesFlags iscustom
93
94" [Components]
95syn keyword issComponentsFlags dontinheritcheck exclusive fixed restart disablenouninstallwarning
96
97" [UninstallDelete] and [InstallDelete]
98syn keyword issInstallDeleteType files filesandordirs dirifempty
99
100" [Tasks]
101syn keyword issTasksFlags checkedonce dontinheritcheck exclusive restart unchecked
102
103
104" Define the default highlighting.
105" Only when an item doesn't have highlighting yet
106
107" The default methods for highlighting.  Can be overridden later
108hi 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
116
117hi 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
132
133
134let b:current_syntax = "iss"
135
136" vim:ts=8
137