7
|
1 " Vim syntax file
|
17
|
2 " Language: Inno Setup File (iss file) and My InnoSetup extension
|
|
3 " Maintainer: Jason Mills (jmills@cs.mun.ca)
|
|
4 " Previous Maintainer: Dominique Stéphan (dominique@mggen.com)
|
39
|
5 " 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"
|
7
|
11
|
|
12 " For version 5.x: Clear all syntax items
|
|
13 " For version 6.x: Quit when a syntax file was already loaded
|
|
14 if version < 600
|
|
15 syntax clear
|
|
16 elseif exists("b:current_syntax")
|
|
17 finish
|
|
18 endif
|
|
19
|
|
20 " shut case off
|
|
21 syn case ignore
|
|
22
|
17
|
23 " Preprocessor
|
|
24 syn region issPreProc start="^\s*#" end="$"
|
|
25
|
7
|
26 " Section
|
39
|
27 syn region issSection start="\[" end="\]"
|
7
|
28
|
|
29 " Label in the [Setup] Section
|
39
|
30 syn match issDirective "^[^=]\+="
|
7
|
31
|
|
32 " URL
|
39
|
33 syn match issURL "http[s]\=:\/\/.*$"
|
7
|
34
|
39
|
35 " Parameters used for any section.
|
|
36 " syn match issParam"[^: ]\+:"
|
|
37 syn match issParam "Name:"
|
|
38 syn match issParam "MinVersion:\|OnlyBelowVersion:\|Languages:"
|
|
39 syn match issParam "Source:\|DestDir:\|DestName:\|CopyMode:"
|
|
40 syn match issParam "Attribs:\|Permissions:\|FontInstall:\|Flags:"
|
|
41 syn match issParam "FileName:\|Parameters:\|WorkingDir:\|HotKey:\|Comment:"
|
|
42 syn match issParam "IconFilename:\|IconIndex:"
|
|
43 syn match issParam "Section:\|Key:\|String:"
|
|
44 syn match issParam "Root:\|SubKey:\|ValueType:\|ValueName:\|ValueData:"
|
|
45 syn match issParam "RunOnceId:"
|
|
46 syn match issParam "Type:\|Excludes:"
|
|
47 syn match issParam "Components:\|Description:\|GroupDescription:\|Types:\|ExtraDiskSpaceRequired:"
|
|
48 syn match issParam "StatusMsg:\|RunOnceId:\|Tasks:"
|
|
49 syn match issParam "MessagesFile:\|LicenseFile:\|InfoBeforeFile:\|InfoAfterFile:"
|
7
|
50
|
39
|
51 syn match issComment "^\s*;.*$"
|
7
|
52
|
|
53 " folder constant
|
39
|
54 syn match issFolder "{[^{]*}"
|
7
|
55
|
|
56 " string
|
39
|
57 syn region issString start=+"+ end=+"+ contains=issFolder
|
7
|
58
|
|
59 " [Dirs]
|
|
60 syn keyword issDirsFlags deleteafterinstall uninsalwaysuninstall uninsneveruninstall
|
|
61
|
|
62 " [Files]
|
15
|
63 syn keyword issFilesCopyMode normal onlyifdoesntexist alwaysoverwrite alwaysskipifsameorolder dontcopy
|
7
|
64 syn keyword issFilesAttribs readonly hidden system
|
15
|
65 syn keyword issFilesPermissions full modify readexec
|
|
66 syn keyword issFilesFlags allowunsafefiles comparetimestampalso confirmoverwrite deleteafterinstall
|
|
67 syn keyword issFilesFlags dontcopy dontverifychecksum external fontisnttruetype ignoreversion
|
|
68 syn keyword issFilesFlags isreadme onlyifdestfileexists onlyifdoesntexist overwritereadonly
|
|
69 syn keyword issFilesFlags promptifolder recursesubdirs regserver regtypelib restartreplace
|
|
70 syn keyword issFilesFlags sharedfile skipifsourcedoesntexist sortfilesbyextension touch
|
|
71 syn keyword issFilesFlags uninsremovereadonly uninsrestartdelete uninsneveruninstall
|
39
|
72 syn keyword issFilesFlags replacesameversion nocompression noencryption noregerror
|
|
73
|
7
|
74
|
|
75 " [Icons]
|
15
|
76 syn keyword issIconsFlags closeonexit createonlyiffileexists dontcloseonexit
|
|
77 syn keyword issIconsFlags runmaximized runminimized uninsneveruninstall useapppaths
|
7
|
78
|
|
79 " [INI]
|
|
80 syn keyword issINIFlags createkeyifdoesntexist uninsdeleteentry uninsdeletesection uninsdeletesectionifempty
|
|
81
|
|
82 " [Registry]
|
|
83 syn keyword issRegRootKey HKCR HKCU HKLM HKU HKCC
|
|
84 syn keyword issRegValueType none string expandsz multisz dword binary
|
15
|
85 syn keyword issRegFlags createvalueifdoesntexist deletekey deletevalue dontcreatekey
|
|
86 syn keyword issRegFlags preservestringtype noerror uninsclearvalue
|
|
87 syn keyword issRegFlags uninsdeletekey uninsdeletekeyifempty uninsdeletevalue
|
7
|
88
|
|
89 " [Run] and [UninstallRun]
|
15
|
90 syn keyword issRunFlags hidewizard nowait postinstall runhidden runmaximized
|
|
91 syn keyword issRunFlags runminimized shellexec skipifdoesntexist skipifnotsilent
|
|
92 syn keyword issRunFlags skipifsilent unchecked waituntilidle
|
7
|
93
|
|
94 " [Types]
|
|
95 syn keyword issTypesFlags iscustom
|
|
96
|
|
97 " [Components]
|
15
|
98 syn keyword issComponentsFlags dontinheritcheck exclusive fixed restart disablenouninstallwarning
|
7
|
99
|
|
100 " [UninstallDelete] and [InstallDelete]
|
|
101 syn keyword issInstallDeleteType files filesandordirs dirifempty
|
|
102
|
15
|
103 " [Tasks]
|
|
104 syn keyword issTasksFlags checkedonce dontinheritcheck exclusive restart unchecked
|
|
105
|
7
|
106
|
|
107 " Define the default highlighting.
|
|
108 " For version 5.7 and earlier: only when not done already
|
|
109 " For version 5.8 and later: only when an item doesn't have highlighting yet
|
|
110 if version >= 508 || !exists("did_iss_syntax_inits")
|
|
111 if version < 508
|
|
112 let did_iss_syntax_inits = 1
|
|
113 command -nargs=+ HiLink hi link <args>
|
|
114 else
|
|
115 command -nargs=+ HiLink hi def link <args>
|
|
116 endif
|
|
117
|
|
118 " The default methods for highlighting. Can be overridden later
|
39
|
119 HiLink issSection Special
|
|
120 HiLink issComment Comment
|
|
121 HiLink issDirective Type
|
|
122 HiLink issParam Type
|
|
123 HiLink issFolder Special
|
|
124 HiLink issString String
|
|
125 HiLink issURL Include
|
|
126 HiLink issPreProc PreProc
|
7
|
127
|
39
|
128 HiLink issDirsFlags Keyword
|
|
129 HiLink issFilesCopyMode Keyword
|
|
130 HiLink issFilesAttribs Keyword
|
|
131 HiLink issFilesPermissions Keyword
|
|
132 HiLink issFilesFlags Keyword
|
|
133 HiLink issIconsFlags Keyword
|
|
134 HiLink issINIFlags Keyword
|
|
135 HiLink issRegRootKey Keyword
|
|
136 HiLink issRegValueType Keyword
|
|
137 HiLink issRegFlags Keyword
|
|
138 HiLink issRunFlags Keyword
|
|
139 HiLink issTypesFlags Keyword
|
|
140 HiLink issComponentsFlags Keyword
|
|
141 HiLink issInstallDeleteType Keyword
|
|
142 HiLink issTasksFlags Keyword
|
7
|
143
|
|
144 delcommand HiLink
|
|
145 endif
|
|
146
|
|
147 let b:current_syntax = "iss"
|
|
148
|
|
149 " vim:ts=8
|