2 " Language: Visual Basic
3 " Maintainer: Tim Chase <vb.vim@tim.thechases.com>
4 " Former Maintainer: Robert M. Cortopassi <cortopar@mindspring.com>
5 " (tried multiple times to contact, but email bounced)
7 " 2005 May 25 Synched with work by Thomas Barthel
8 " 2004 May 30 Added a few keywords
10 " This was thrown together after seeing numerous requests on the
11 " VIM and VIM-DEV mailing lists. It is by no means complete.
12 " Send comments, suggestions and requests to the maintainer.
14 " For version 5.x: Clear all syntax items
15 " For version 6.x: Quit when a syntax file was already loaded
18 elseif exists("b:current_syntax")
22 " VB is case insensitive
25 syn keyword vbConditional If Then ElseIf Else Select Case
27 syn keyword vbOperator AddressOf And ByRef ByVal Eqv Imp In
28 syn keyword vbOperator Is Like Mod Not Or To Xor
30 syn match vbOperator "[()+.,\-/*=&]"
31 syn match vbOperator "[<>]=\="
32 syn match vbOperator "<>"
33 syn match vbOperator "\s\+_$"
35 syn keyword vbBoolean True False
36 syn keyword vbConst Null Nothing
38 syn keyword vbRepeat Do For ForEach Loop Next
39 syn keyword vbRepeat Step To Until Wend While
41 syn keyword vbEvents AccessKeyPress Activate ActiveRowChanged
42 syn keyword vbEvents AfterAddFile AfterChangeFileName AfterCloseFile
43 syn keyword vbEvents AfterColEdit AfterColUpdate AfterDelete
44 syn keyword vbEvents AfterInsert AfterLabelEdit AfterRemoveFile
45 syn keyword vbEvents AfterUpdate AfterWriteFile AmbientChanged
46 syn keyword vbEvents ApplyChanges Associate AsyncProgress
47 syn keyword vbEvents AsyncReadComplete AsyncReadProgress AxisActivated
48 syn keyword vbEvents AxisLabelActivated AxisLabelSelected
49 syn keyword vbEvents AxisLabelUpdated AxisSelected AxisTitleActivated
50 syn keyword vbEvents AxisTitleSelected AxisTitleUpdated AxisUpdated
51 syn keyword vbEvents BeforeClick BeforeColEdit BeforeColUpdate
52 syn keyword vbEvents BeforeConnect BeforeDelete BeforeInsert
53 syn keyword vbEvents BeforeLabelEdit BeforeLoadFile BeforeUpdate
54 syn keyword vbEvents BeginRequest BeginTrans ButtonClick
55 syn keyword vbEvents ButtonCompleted ButtonDropDown ButtonGotFocus
56 syn keyword vbEvents ButtonLostFocus CallbackKeyDown Change Changed
57 syn keyword vbEvents ChartActivated ChartSelected ChartUpdated Click
58 syn keyword vbEvents Close CloseQuery CloseUp ColEdit ColResize
59 syn keyword vbEvents Collapse ColumnClick CommitTrans Compare
60 syn keyword vbEvents ConfigChageCancelled ConfigChanged
61 syn keyword vbEvents ConfigChangedCancelled Connect ConnectionRequest
62 syn keyword vbEvents CurrentRecordChanged DECommandAdded
63 syn keyword vbEvents DECommandPropertyChanged DECommandRemoved
64 syn keyword vbEvents DEConnectionAdded DEConnectionPropertyChanged
65 syn keyword vbEvents DEConnectionRemoved DataArrival DataChanged
66 syn keyword vbEvents DataUpdated DateClicked DblClick Deactivate
67 syn keyword vbEvents DevModeChange DeviceArrival DeviceOtherEvent
68 syn keyword vbEvents DeviceQueryRemove DeviceQueryRemoveFailed
69 syn keyword vbEvents DeviceRemoveComplete DeviceRemovePending
70 syn keyword vbEvents Disconnect DisplayChanged Dissociate
71 syn keyword vbEvents DoGetNewFileName Done DonePainting DownClick
72 syn keyword vbEvents DragDrop DragOver DropDown EditProperty EditQuery
73 syn keyword vbEvents EndRequest EnterCell EnterFocus ExitFocus Expand
74 syn keyword vbEvents FontChanged FootnoteActivated FootnoteSelected
75 syn keyword vbEvents FootnoteUpdated Format FormatSize GotFocus
76 syn keyword vbEvents HeadClick HeightChanged Hide InfoMessage
77 syn keyword vbEvents IniProperties InitProperties Initialize
78 syn keyword vbEvents ItemActivated ItemAdded ItemCheck ItemClick
79 syn keyword vbEvents ItemReloaded ItemRemoved ItemRenamed
80 syn keyword vbEvents ItemSeletected KeyDown KeyPress KeyUp LeaveCell
81 syn keyword vbEvents LegendActivated LegendSelected LegendUpdated
82 syn keyword vbEvents LinkClose LinkError LinkExecute LinkNotify
83 syn keyword vbEvents LinkOpen Load LostFocus MouseDown MouseMove
84 syn keyword vbEvents MouseUp NodeCheck NodeClick OLECompleteDrag
85 syn keyword vbEvents OLEDragDrop OLEDragOver OLEGiveFeedback OLESetData
86 syn keyword vbEvents OLEStartDrag ObjectEvent ObjectMove OnAddNew
87 syn keyword vbEvents OnComm Paint PanelClick PanelDblClick PathChange
88 syn keyword vbEvents PatternChange PlotActivated PlotSelected
89 syn keyword vbEvents PlotUpdated PointActivated PointLabelActivated
90 syn keyword vbEvents PointLabelSelected PointLabelUpdated PointSelected
91 syn keyword vbEvents PointUpdated PowerQuerySuspend PowerResume
92 syn keyword vbEvents PowerStatusChanged PowerSuspend ProcessTag
93 syn keyword vbEvents ProcessingTimeout QueryChangeConfig QueryClose
94 syn keyword vbEvents QueryComplete QueryCompleted QueryTimeout
95 syn keyword vbEvents QueryUnload ReadProperties RepeatedControlLoaded
96 syn keyword vbEvents RepeatedControlUnloaded Reposition
97 syn keyword vbEvents RequestChangeFileName RequestWriteFile Resize
98 syn keyword vbEvents ResultsChanged RetainedProject RollbackTrans
99 syn keyword vbEvents RowColChange RowCurrencyChange RowResize
100 syn keyword vbEvents RowStatusChanged Scroll SelChange SelectionChanged
101 syn keyword vbEvents SendComplete SendProgress SeriesActivated
102 syn keyword vbEvents SeriesSelected SeriesUpdated SettingChanged Show
103 syn keyword vbEvents SplitChange Start StateChanged StatusUpdate
104 syn keyword vbEvents SysColorsChanged Terminate TimeChanged Timer
105 syn keyword vbEvents TitleActivated TitleSelected TitleUpdated
106 syn keyword vbEvents UnboundAddData UnboundDeleteRow
107 syn keyword vbEvents UnboundGetRelativeBookmark UnboundReadData
108 syn keyword vbEvents UnboundWriteData Unformat Unload UpClick Updated
109 syn keyword vbEvents UserEvent Validate ValidationError
110 syn keyword vbEvents VisibleRecordChanged WillAssociate WillChangeData
111 syn keyword vbEvents WillDissociate WillExecute WillUpdateRows
112 syn keyword vbEvents WriteProperties
115 syn keyword vbFunction Abs Array Asc AscB AscW Atn Avg BOF CBool CByte
116 syn keyword vbFunction CCur CDate CDbl CInt CLng CSng CStr CVDate CVErr
117 syn keyword vbFunction CVar CallByName Cdec Choose Chr ChrB ChrW Command
118 syn keyword vbFunction Cos Count CreateObject CurDir DDB Date DateAdd
119 syn keyword vbFunction DateDiff DatePart DateSerial DateValue Day Dir
120 syn keyword vbFunction DoEvents EOF Environ Error Exp FV FileAttr
121 syn keyword vbFunction FileDateTime FileLen FilterFix Fix Format
122 syn keyword vbFunction FormatCurrency FormatDateTime FormatNumber
123 syn keyword vbFunction FormatPercent FreeFile GetAllStrings GetAttr
124 syn keyword vbFunction GetAutoServerSettings GetObject GetSetting Hex
125 syn keyword vbFunction Hour IIf IMEStatus IPmt InStr Input InputB
126 syn keyword vbFunction InputBox InstrB Int IsArray IsDate IsEmpty IsError
127 syn keyword vbFunction IsMissing IsNull IsNumeric IsObject Join LBound
128 syn keyword vbFunction LCase LOF LTrim Left LeftB Len LenB LoadPicture
129 syn keyword vbFunction LoadResData LoadResPicture LoadResString Loc Log
130 syn keyword vbFunction MIRR Max Mid MidB Min Minute Month MonthName
131 syn keyword vbFunction MsgBox NPV NPer Now Oct PPmt PV Partition Pmt
132 syn keyword vbFunction QBColor RGB RTrim Rate Replace Right RightB Rnd
133 syn keyword vbFunction Round SLN SYD Second Seek Sgn Shell Sin Space Spc
134 syn keyword vbFunction Split Sqr StDev StDevP Str StrComp StrConv
135 syn keyword vbFunction StrReverse String Sum Switch Tab Tan Time
136 syn keyword vbFunction TimeSerial TimeValue Timer Trim TypeName UBound
137 syn keyword vbFunction UCase Val Var VarP VarType Weekday WeekdayName
138 syn keyword vbFunction Year
140 syn keyword vbMethods AboutBox Accept Activate Add AddCustom AddFile
141 syn keyword vbMethods AddFromFile AddFromGuid AddFromString
142 syn keyword vbMethods AddFromTemplate AddItem AddNew AddToAddInToolbar
143 syn keyword vbMethods AddToolboxProgID Append AppendAppendChunk
144 syn keyword vbMethods AppendChunk Arrange Assert AsyncRead BatchUpdate
145 syn keyword vbMethods BeginQueryEdit BeginTrans Bind BuildPath
146 syn keyword vbMethods CanPropertyChange Cancel CancelAsyncRead
147 syn keyword vbMethods CancelBatch CancelUpdate CaptureImage CellText
148 syn keyword vbMethods CellValue Circle Clear ClearFields ClearSel
149 syn keyword vbMethods ClearSelCols ClearStructure Clone Close Cls
150 syn keyword vbMethods ColContaining CollapseAll ColumnSize CommitTrans
151 syn keyword vbMethods CompactDatabase Compose Connect Copy CopyFile
152 syn keyword vbMethods CopyFolder CopyQueryDef Count CreateDatabase
153 syn keyword vbMethods CreateDragImage CreateEmbed CreateField
154 syn keyword vbMethods CreateFolder CreateGroup CreateIndex CreateLink
155 syn keyword vbMethods CreatePreparedStatement CreatePropery CreateQuery
156 syn keyword vbMethods CreateQueryDef CreateRelation CreateTableDef
157 syn keyword vbMethods CreateTextFile CreateToolWindow CreateUser
158 syn keyword vbMethods CreateWorkspace Customize Cut Delete
159 syn keyword vbMethods DeleteColumnLabels DeleteColumns DeleteFile
160 syn keyword vbMethods DeleteFolder DeleteLines DeleteRowLabels
161 syn keyword vbMethods DeleteRows DeselectAll DesignerWindow DoVerb Drag
162 syn keyword vbMethods Draw DriveExists Edit EditCopy EditPaste EndDoc
163 syn keyword vbMethods EnsureVisible EstablishConnection Execute Exists
164 syn keyword vbMethods Expand Export ExportReport ExtractIcon Fetch
165 syn keyword vbMethods FetchVerbs FileExists Files FillCache Find
166 syn keyword vbMethods FindFirst FindItem FindLast FindNext FindPrevious
167 syn keyword vbMethods FolderExists Forward GetAbsolutePathName
168 syn keyword vbMethods GetBaseName GetBookmark GetChunk GetClipString
169 syn keyword vbMethods GetData GetDrive GetDriveName GetFile GetFileName
170 syn keyword vbMethods GetFirstVisible GetFolder GetFormat GetHeader
171 syn keyword vbMethods GetLineFromChar GetNumTicks GetParentFolderName
172 syn keyword vbMethods GetRows GetSelectedPart GetSelection
173 syn keyword vbMethods GetSpecialFolder GetTempName GetText
174 syn keyword vbMethods GetVisibleCount GoBack GoForward Hide HitTest
175 syn keyword vbMethods HoldFields Idle Import InitializeLabels Insert
176 syn keyword vbMethods InsertColumnLabels InsertColumns InsertFile
177 syn keyword vbMethods InsertLines InsertObjDlg InsertRowLabels
178 syn keyword vbMethods InsertRows Item Keys KillDoc Layout Line Lines
179 syn keyword vbMethods LinkExecute LinkPoke LinkRequest LinkSend Listen
180 syn keyword vbMethods LoadFile LoadResData LoadResPicture LoadResString
181 syn keyword vbMethods LogEvent MakeCompileFile MakeCompiledFile
182 syn keyword vbMethods MakeReplica MoreResults Move MoveData MoveFile
183 syn keyword vbMethods MoveFirst MoveFolder MoveLast MoveNext
184 syn keyword vbMethods MovePrevious NavigateTo NewPage NewPassword
185 syn keyword vbMethods NextRecordset OLEDrag OnAddinsUpdate OnConnection
186 syn keyword vbMethods OnDisconnection OnStartupComplete Open
187 syn keyword vbMethods OpenAsTextStream OpenConnection OpenDatabase
188 syn keyword vbMethods OpenQueryDef OpenRecordset OpenResultset OpenURL
189 syn keyword vbMethods Overlay PSet PaintPicture PastSpecialDlg Paste
190 syn keyword vbMethods PeekData Play Point PopulatePartial PopupMenu
191 syn keyword vbMethods Print PrintForm PrintReport PropertyChanged Quit
192 syn keyword vbMethods Raise RandomDataFill RandomFillColumns
193 syn keyword vbMethods RandomFillRows ReFill Read ReadAll ReadFromFile
194 syn keyword vbMethods ReadLine ReadProperty Rebind Refresh RefreshLink
195 syn keyword vbMethods RegisterDatabase ReleaseInstance Reload Remove
196 syn keyword vbMethods RemoveAddInFromToolbar RemoveAll RemoveItem Render
197 syn keyword vbMethods RepairDatabase ReplaceLine Reply ReplyAll Requery
198 syn keyword vbMethods ResetCustom ResetCustomLabel ResolveName
199 syn keyword vbMethods RestoreToolbar Resync Rollback RollbackTrans
200 syn keyword vbMethods RowBookmark RowContaining RowTop Save SaveAs
201 syn keyword vbMethods SaveFile SaveToFile SaveToOle1File SaveToolbar
202 syn keyword vbMethods Scale ScaleX ScaleY Scroll SelPrint SelectAll
203 syn keyword vbMethods SelectPart Send SendData Set SetAutoServerSettings
204 syn keyword vbMethods SetData SetFocus SetOption SetSelection SetSize
205 syn keyword vbMethods SetText SetViewport Show ShowColor ShowFont
206 syn keyword vbMethods ShowHelp ShowOpen ShowPrinter ShowSave
207 syn keyword vbMethods ShowWhatsThis SignOff SignOn Size Skip SkipLine
208 syn keyword vbMethods Span Split SplitContaining StartLabelEdit
209 syn keyword vbMethods StartLogging Stop Synchronize Tag TextHeight
210 syn keyword vbMethods TextWidth ToDefaults Trace TwipsToChartPart
211 syn keyword vbMethods TypeByChartType URLFor Update UpdateControls
212 syn keyword vbMethods UpdateRecord UpdateRow Upto ValidateControls Value
213 syn keyword vbMethods WhatsThisMode Write WriteBlankLines WriteLine
214 syn keyword vbMethods WriteProperty WriteTemplate ZOrder
215 syn keyword vbMethods rdoCreateEnvironment rdoRegisterDataSource
217 syn keyword vbStatement Alias AppActivate As Base Beep Begin Call ChDir
218 syn keyword vbStatement ChDrive Close Const Date Declare DefBool DefByte
219 syn keyword vbStatement DefCur DefDate DefDbl DefDec DefInt DefLng DefObj
220 syn keyword vbStatement DefSng DefStr DefVar Deftype DeleteSetting Dim Do
221 syn keyword vbStatement Each ElseIf End Enum Erase Error Event Exit
222 syn keyword vbStatement Explicit FileCopy For ForEach Function Get GoSub
223 syn keyword vbStatement GoTo Gosub Implements Kill LSet Let Lib LineInput
224 syn keyword vbStatement Load Lock Loop Mid MkDir Name Next On OnError Open
225 syn keyword vbStatement Option Preserve Private Property Public Put RSet
226 syn keyword vbStatement RaiseEvent Randomize ReDim Redim Rem Reset Resume
227 syn keyword vbStatement Return RmDir SavePicture SaveSetting Seek SendKeys
228 syn keyword vbStatement Sendkeys Set SetAttr Static Step Stop Sub Time
229 syn keyword vbStatement Type Unload Unlock Until Wend While Width With
230 syn keyword vbStatement Write
232 syn keyword vbKeyword As Binary ByRef ByVal Date Empty Error Friend Get
233 syn keyword vbKeyword Input Is Len Lock Me Mid New Nothing Null On
234 syn keyword vbKeyword Option Optional ParamArray Print Private Property
235 syn keyword vbKeyword Public PublicNotCreateable OnNewProcessSingleUse
236 syn keyword vbKeyword InSameProcessMultiUse GlobalMultiUse Resume Seek
237 syn keyword vbKeyword Set Static Step String Time WithEvents
239 syn keyword vbTodo contained TODO
242 syn keyword vbTypes Boolean Byte Currency Date Decimal Double Empty
243 syn keyword vbTypes Integer Long Object Single String Variant
246 syn keyword vbDefine dbBigInt dbBinary dbBoolean dbByte dbChar
247 syn keyword vbDefine dbCurrency dbDate dbDecimal dbDouble dbFloat
248 syn keyword vbDefine dbGUID dbInteger dbLong dbLongBinary dbMemo
249 syn keyword vbDefine dbNumeric dbSingle dbText dbTime dbTimeStamp
250 syn keyword vbDefine dbVarBinary
253 syn keyword vbDefine vb3DDKShadow vb3DFace vb3DHighlight vb3DLight
254 syn keyword vbDefine vb3DShadow vbAbort vbAbortRetryIgnore
255 syn keyword vbDefine vbActiveBorder vbActiveTitleBar vbAlias
256 syn keyword vbDefine vbApplicationModal vbApplicationWorkspace
257 syn keyword vbDefine vbAppTaskManager vbAppWindows vbArchive vbArray
258 syn keyword vbDefine vbBack vbBinaryCompare vbBlack vbBlue vbBoolean
259 syn keyword vbDefine vbButtonFace vbButtonShadow vbButtonText vbByte
260 syn keyword vbDefine vbCalGreg vbCalHijri vbCancel vbCr vbCritical
261 syn keyword vbDefine vbCrLf vbCurrency vbCyan vbDatabaseCompare
262 syn keyword vbDefine vbDataObject vbDate vbDecimal vbDefaultButton1
263 syn keyword vbDefine vbDefaultButton2 vbDefaultButton3 vbDefaultButton4
264 syn keyword vbDefine vbDesktop vbDirectory vbDouble vbEmpty vbError
265 syn keyword vbDefine vbExclamation vbFirstFourDays vbFirstFullWeek
266 syn keyword vbDefine vbFirstJan1 vbFormCode vbFormControlMenu
267 syn keyword vbDefine vbFormFeed vbFormMDIForm vbFriday vbFromUnicode
268 syn keyword vbDefine vbGrayText vbGreen vbHidden vbHide vbHighlight
269 syn keyword vbDefine vbHighlightText vbHiragana vbIgnore vbIMEAlphaDbl
270 syn keyword vbDefine vbIMEAlphaSng vbIMEDisable vbIMEHiragana
271 syn keyword vbDefine vbIMEKatakanaDbl vbIMEKatakanaSng vbIMEModeAlpha
272 syn keyword vbDefine vbIMEModeAlphaFull vbIMEModeDisable
273 syn keyword vbDefine vbIMEModeHangul vbIMEModeHangulFull
274 syn keyword vbDefine vbIMEModeHiragana vbIMEModeKatakana
275 syn keyword vbDefine vbIMEModeKatakanaHalf vbIMEModeNoControl
276 syn keyword vbDefine vbIMEModeOff vbIMEModeOn vbIMENoOp vbIMEOff
277 syn keyword vbDefine vbIMEOn vbInactiveBorder vbInactiveCaptionText
278 syn keyword vbDefine vbInactiveTitleBar vbInfoBackground vbInformation
279 syn keyword vbDefine vbInfoText vbInteger vbKatakana vbKey0 vbKey1
280 syn keyword vbDefine vbKey2 vbKey3 vbKey4 vbKey5 vbKey6 vbKey7 vbKey8
281 syn keyword vbDefine vbKey9 vbKeyA vbKeyAdd vbKeyB vbKeyBack vbKeyC
282 syn keyword vbDefine vbKeyCancel vbKeyCapital vbKeyClear vbKeyControl
283 syn keyword vbDefine vbKeyD vbKeyDecimal vbKeyDelete vbKeyDivide
284 syn keyword vbDefine vbKeyDown vbKeyE vbKeyEnd vbKeyEscape vbKeyExecute
285 syn keyword vbDefine vbKeyF vbKeyF1 vbKeyF10 vbKeyF11 vbKeyF12 vbKeyF13
286 syn keyword vbDefine vbKeyF14 vbKeyF15 vbKeyF16 vbKeyF2 vbKeyF3 vbKeyF4
287 syn keyword vbDefine vbKeyF5 vbKeyF6 vbKeyF7 vbKeyF8 vbKeyF9 vbKeyG
288 syn keyword vbDefine vbKeyH vbKeyHelp vbKeyHome vbKeyI vbKeyInsert
289 syn keyword vbDefine vbKeyJ vbKeyK vbKeyL vbKeyLButton vbKeyLeft vbKeyM
290 syn keyword vbDefine vbKeyMButton vbKeyMenu vbKeyMultiply vbKeyN
291 syn keyword vbDefine vbKeyNumlock vbKeyNumpad0 vbKeyNumpad1
292 syn keyword vbDefine vbKeyNumpad2 vbKeyNumpad3 vbKeyNumpad4
293 syn keyword vbDefine vbKeyNumpad5 vbKeyNumpad6 vbKeyNumpad7
294 syn keyword vbDefine vbKeyNumpad8 vbKeyNumpad9 vbKeyO vbKeyP
295 syn keyword vbDefine vbKeyPageDown vbKeyPageUp vbKeyPause vbKeyPrint
296 syn keyword vbDefine vbKeyQ vbKeyR vbKeyRButton vbKeyReturn vbKeyRight
297 syn keyword vbDefine vbKeyS vbKeySelect vbKeySeparator vbKeyShift
298 syn keyword vbDefine vbKeySnapshot vbKeySpace vbKeySubtract vbKeyT
299 syn keyword vbDefine vbKeyTab vbKeyU vbKeyUp vbKeyV vbKeyW vbKeyX
300 syn keyword vbDefine vbKeyY vbKeyZ vbLf vbLong vbLowerCase vbMagenta
301 syn keyword vbDefine vbMaximizedFocus vbMenuBar vbMenuText
302 syn keyword vbDefine vbMinimizedFocus vbMinimizedNoFocus vbMonday
303 syn keyword vbDefine vbMsgBox vbMsgBoxHelpButton vbMsgBoxRight
304 syn keyword vbDefine vbMsgBoxRtlReading vbMsgBoxSetForeground
305 syn keyword vbDefine vbMsgBoxText vbNarrow vbNewLine vbNo vbNormal
306 syn keyword vbDefine vbNormalFocus vbNormalNoFocus vbNull vbNullChar
307 syn keyword vbDefine vbNullString vbObject vbObjectError vbOK
308 syn keyword vbDefine vbOKCancel vbOKOnly vbProperCase vbQuestion
309 syn keyword vbDefine vbReadOnly vbRed vbRetry vbRetryCancel vbSaturday
310 syn keyword vbDefine vbScrollBars vbSingle vbString vbSunday vbSystem
311 syn keyword vbDefine vbSystemModal vbTab vbTextCompare vbThursday
312 syn keyword vbDefine vbTitleBarText vbTuesday vbUnicode vbUpperCase
313 syn keyword vbDefine vbUseSystem vbUseSystemDayOfWeek vbVariant
314 syn keyword vbDefine vbVerticalTab vbVolume vbWednesday vbWhite vbWide
315 syn keyword vbDefine vbWindowBackground vbWindowFrame vbWindowText
316 syn keyword vbDefine vbYellow vbYes vbYesNo vbYesNoCancel
319 "integer number, or floating point number without a dot.
320 syn match vbNumber "\<\d\+\>"
321 "floating point number, with dot
322 syn match vbNumber "\<\d\+\.\d*\>"
323 "floating point number, starting with a dot
324 syn match vbNumber "\.\d\+\>"
325 "syn match vbNumber "{[[:xdigit:]-]\+}\|&[hH][[:xdigit:]]\+&"
326 "syn match vbNumber ":[[:xdigit:]]\+"
327 "syn match vbNumber "[-+]\=\<\d\+\>"
328 syn match vbFloat "[-+]\=\<\d\+[eE][\-+]\=\d\+"
329 syn match vbFloat "[-+]\=\<\d\+\.\d*\([eE][\-+]\=\d\+\)\="
330 syn match vbFloat "[-+]\=\<\.\d\+\([eE][\-+]\=\d\+\)\="
332 " String and Character contstants
333 syn region vbString start=+"+ end=+"\|$+
334 syn region vbComment start="\(^\|\s\)REM\s" end="$" contains=vbTodo
335 syn region vbComment start="\(^\|\s\)\'" end="$" contains=vbTodo
336 syn match vbLineNumber "^\d\+\(\s\|$\)"
337 syn match vbTypeSpecifier "[a-zA-Z0-9][\$%&!#]"ms=s+1
338 syn match vbTypeSpecifier "#[a-zA-Z0-9]"me=e-1
340 " Define the default highlighting.
341 " For version 5.7 and earlier: only when not done already
342 " For version 5.8 and later: only when an item doesn't have highlighting yet
343 if version >= 508 || !exists("did_vb_syntax_inits")
345 let did_vb_syntax_inits = 1
346 command -nargs=+ HiLink hi link <args>
348 command -nargs=+ HiLink hi def link <args>
351 HiLink vbBoolean Boolean
352 HiLink vbLineNumber Comment
353 HiLink vbComment Comment
354 HiLink vbConditional Conditional
355 HiLink vbConst Constant
356 HiLink vbDefine Constant
358 HiLink vbFunction Identifier
359 HiLink vbIdentifier Identifier
360 HiLink vbNumber Number
362 HiLink vbMethods PreProc
363 HiLink vbOperator Operator
364 HiLink vbRepeat Repeat
365 HiLink vbString String
366 HiLink vbStatement Statement
367 HiLink vbKeyword Statement
368 HiLink vbEvents Special
371 HiLink vbTypeSpecifier Type
376 let b:current_syntax = "vb"