blob: be8901cc28434263b639fc2df32c876576400945 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" 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
8if version < 600
9 syntax clear
10elseif exists("b:current_syntax")
11 finish
12endif
13
14" shut case off
15syn case ignore
16
17" Section
18syn region issHeader start="\[" end="\]"
19
20" Label in the [Setup] Section
21syn match issLabel "^[^=]\+="
22
23" URL
24syn match issURL "http[s]\=:\/\/.*$"
25
26" syn match issName "[^: ]\+:"
27syn match issName "Name:"
28syn match issName "MinVersion:\|OnlyBelowVersion:"
29syn match issName "Source:\|DestDir:\|DestName:\|CopyMode:"
30syn match issName "Attribs:\|FontInstall:\|Flags:"
31syn match issName "FileName:\|Parameters:\|WorkingDir:\|Comment:"
32syn match issName "IconFilename:\|IconIndex:"
33syn match issName "Section:\|Key:\|String:"
34syn match issName "Root:\|SubKey:\|ValueType:\|ValueName:\|ValueData:"
35syn match issName "RunOnceId:"
36syn match issName "Type:"
37syn match issName "Components:\|Description:\|GroupDescription\|Types:"
38
39syn match issComment "^;.*$"
40
41" folder constant
42syn match issFolder "{[^{]*}"
43
44" string
45syn region issString start=+"+ end=+"+ contains=issFolder
46
47" [Dirs]
48syn keyword issDirsFlags deleteafterinstall uninsalwaysuninstall uninsneveruninstall
49
50" [Files]
51syn keyword issFilesCopyMode normal onlyifdoesntexist alwaysoverwrite alwaysskipifsameorolder
52syn keyword issFilesAttribs readonly hidden system
53syn keyword issFilesFlags comparetimestampalso confirmoverwrite deleteafterinstall
54syn keyword issFilesFlags external fontisnttruetype isreadme overwritereadonly
55syn keyword issFilesFlags regserver regtypelib restartreplace
56syn keyword issFilesFlags sharedfile skipifsourcedoesntexist uninsneveruninstall
57
58" [Icons]
59syn keyword issIconsFlags createonlyiffileexists runminimized uninsneveruninstall useapppaths
60
61" [INI]
62syn keyword issINIFlags createkeyifdoesntexist uninsdeleteentry uninsdeletesection uninsdeletesectionifempty
63
64" [Registry]
65syn keyword issRegRootKey HKCR HKCU HKLM HKU HKCC
66syn keyword issRegValueType none string expandsz multisz dword binary
67syn keyword issRegFlags createvalueifdoesntexist deletekey deletevalue preservestringtype
68syn keyword issRegFlags uninsclearvalue uninsdeletekey uninsdeletekeyifempty uninsdeletevalue
69
70" [Run] and [UninstallRun]
71syn keyword issRunFlags nowait shellexec skipifdoesntexist runminimized waituntilidle
72syn keyword issRunFlags postinstall unchecked showcheckbox
73
74" [Types]
75syn keyword issTypesFlags iscustom
76
77" [Components]
78syn keyword issComponentsFlags fixed restart disablenouninstallwarning
79
80" [UninstallDelete] and [InstallDelete]
81syn 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
87if 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
121endif
122
123let b:current_syntax = "iss"
124
125" vim:ts=8