7
|
1 " Vim syntax file
|
|
2 " Language: Inno Setup File (iss file) and My InnoSetup extension
|
|
3 " Maintainer: Dominique Stéphan (dominique@mggen.com)
|
|
4 " Last change: 2003 May 11
|
|
5
|
|
6 " For version 5.x: Clear all syntax items
|
|
7 " For version 6.x: Quit when a syntax file was already loaded
|
|
8 if version < 600
|
|
9 syntax clear
|
|
10 elseif exists("b:current_syntax")
|
|
11 finish
|
|
12 endif
|
|
13
|
|
14 " shut case off
|
|
15 syn case ignore
|
|
16
|
|
17 " Section
|
|
18 syn region issHeader start="\[" end="\]"
|
|
19
|
|
20 " Label in the [Setup] Section
|
|
21 syn match issLabel "^[^=]\+="
|
|
22
|
|
23 " URL
|
|
24 syn match issURL "http[s]\=:\/\/.*$"
|
|
25
|
|
26 " syn match issName "[^: ]\+:"
|
|
27 syn match issName "Name:"
|
|
28 syn match issName "MinVersion:\|OnlyBelowVersion:"
|
|
29 syn match issName "Source:\|DestDir:\|DestName:\|CopyMode:"
|
|
30 syn match issName "Attribs:\|FontInstall:\|Flags:"
|
|
31 syn match issName "FileName:\|Parameters:\|WorkingDir:\|Comment:"
|
|
32 syn match issName "IconFilename:\|IconIndex:"
|
|
33 syn match issName "Section:\|Key:\|String:"
|
|
34 syn match issName "Root:\|SubKey:\|ValueType:\|ValueName:\|ValueData:"
|
|
35 syn match issName "RunOnceId:"
|
|
36 syn match issName "Type:"
|
|
37 syn match issName "Components:\|Description:\|GroupDescription\|Types:"
|
|
38
|
|
39 syn match issComment "^;.*$"
|
|
40
|
|
41 " folder constant
|
|
42 syn match issFolder "{[^{]*}"
|
|
43
|
|
44 " string
|
|
45 syn region issString start=+"+ end=+"+ contains=issFolder
|
|
46
|
|
47 " [Dirs]
|
|
48 syn keyword issDirsFlags deleteafterinstall uninsalwaysuninstall uninsneveruninstall
|
|
49
|
|
50 " [Files]
|
|
51 syn keyword issFilesCopyMode normal onlyifdoesntexist alwaysoverwrite alwaysskipifsameorolder
|
|
52 syn keyword issFilesAttribs readonly hidden system
|
|
53 syn keyword issFilesFlags comparetimestampalso confirmoverwrite deleteafterinstall
|
|
54 syn keyword issFilesFlags external fontisnttruetype isreadme overwritereadonly
|
|
55 syn keyword issFilesFlags regserver regtypelib restartreplace
|
|
56 syn keyword issFilesFlags sharedfile skipifsourcedoesntexist uninsneveruninstall
|
|
57
|
|
58 " [Icons]
|
|
59 syn keyword issIconsFlags createonlyiffileexists runminimized uninsneveruninstall useapppaths
|
|
60
|
|
61 " [INI]
|
|
62 syn keyword issINIFlags createkeyifdoesntexist uninsdeleteentry uninsdeletesection uninsdeletesectionifempty
|
|
63
|
|
64 " [Registry]
|
|
65 syn keyword issRegRootKey HKCR HKCU HKLM HKU HKCC
|
|
66 syn keyword issRegValueType none string expandsz multisz dword binary
|
|
67 syn keyword issRegFlags createvalueifdoesntexist deletekey deletevalue preservestringtype
|
|
68 syn keyword issRegFlags uninsclearvalue uninsdeletekey uninsdeletekeyifempty uninsdeletevalue
|
|
69
|
|
70 " [Run] and [UninstallRun]
|
|
71 syn keyword issRunFlags nowait shellexec skipifdoesntexist runminimized waituntilidle
|
|
72 syn keyword issRunFlags postinstall unchecked showcheckbox
|
|
73
|
|
74 " [Types]
|
|
75 syn keyword issTypesFlags iscustom
|
|
76
|
|
77 " [Components]
|
|
78 syn keyword issComponentsFlags fixed restart disablenouninstallwarning
|
|
79
|
|
80 " [UninstallDelete] and [InstallDelete]
|
|
81 syn keyword issInstallDeleteType files filesandordirs dirifempty
|
|
82
|
|
83
|
|
84 " Define the default highlighting.
|
|
85 " For version 5.7 and earlier: only when not done already
|
|
86 " For version 5.8 and later: only when an item doesn't have highlighting yet
|
|
87 if version >= 508 || !exists("did_iss_syntax_inits")
|
|
88 if version < 508
|
|
89 let did_iss_syntax_inits = 1
|
|
90 command -nargs=+ HiLink hi link <args>
|
|
91 else
|
|
92 command -nargs=+ HiLink hi def link <args>
|
|
93 endif
|
|
94
|
|
95 " The default methods for highlighting. Can be overridden later
|
|
96 HiLink issHeader Special
|
|
97 HiLink issComment Comment
|
|
98 HiLink issLabel Type
|
|
99 HiLink issName Type
|
|
100 HiLink issFolder Special
|
|
101 HiLink issString String
|
|
102 HiLink issValue String
|
|
103 HiLink issURL Include
|
|
104
|
|
105 HiLink issDirsFlags Keyword
|
|
106 HiLink issFilesCopyMode Keyword
|
|
107 HiLink issFilesAttribs Keyword
|
|
108 HiLink issFilesFlags Keyword
|
|
109 HiLink issIconsFlags Keyword
|
|
110 HiLink issINIFlags Keyword
|
|
111 HiLink issRegRootKey Keyword
|
|
112 HiLink issRegValueType Keyword
|
|
113 HiLink issRegFlags Keyword
|
|
114 HiLink issRunFlags Keyword
|
|
115 HiLink issTypesFlags Keyword
|
|
116 HiLink issComponentsFlags Keyword
|
|
117 HiLink issInstallDeleteType Keyword
|
|
118
|
|
119
|
|
120 delcommand HiLink
|
|
121 endif
|
|
122
|
|
123 let b:current_syntax = "iss"
|
|
124
|
|
125 " vim:ts=8
|