xref: /vim-8.2.3635/runtime/syntax/vb.vim (revision f37506f6)
1071d4279SBram Moolenaar" Vim syntax file
2071d4279SBram Moolenaar" Language:	Visual Basic
3071d4279SBram Moolenaar" Maintainer:	Tim Chase <[email protected]>
4071d4279SBram Moolenaar" Former Maintainer:	Robert M. Cortopassi <[email protected]>
5071d4279SBram Moolenaar"	(tried multiple times to contact, but email bounced)
6313b7237SBram Moolenaar" Last Change:
7313b7237SBram Moolenaar"   2005 May 25  Synched with work by Thomas Barthel
8071d4279SBram Moolenaar"   2004 May 30  Added a few keywords
9071d4279SBram Moolenaar
10071d4279SBram Moolenaar" This was thrown together after seeing numerous requests on the
11071d4279SBram Moolenaar" VIM and VIM-DEV mailing lists.  It is by no means complete.
12071d4279SBram Moolenaar" Send comments, suggestions and requests to the maintainer.
13071d4279SBram Moolenaar
1489bcfda6SBram Moolenaar" quit when a syntax file was already loaded
1589bcfda6SBram Moolenaarif exists("b:current_syntax")
16071d4279SBram Moolenaar	finish
17071d4279SBram Moolenaarendif
18071d4279SBram Moolenaar
19071d4279SBram Moolenaar" VB is case insensitive
20071d4279SBram Moolenaarsyn case ignore
21071d4279SBram Moolenaar
22313b7237SBram Moolenaarsyn keyword vbConditional If Then ElseIf Else Select Case
23071d4279SBram Moolenaar
24313b7237SBram Moolenaarsyn keyword vbOperator AddressOf And ByRef ByVal Eqv Imp In
25313b7237SBram Moolenaarsyn keyword vbOperator Is Like Mod Not Or To Xor
26071d4279SBram Moolenaar
27071d4279SBram Moolenaarsyn match vbOperator "[()+.,\-/*=&]"
28071d4279SBram Moolenaarsyn match vbOperator "[<>]=\="
29071d4279SBram Moolenaarsyn match vbOperator "<>"
30071d4279SBram Moolenaarsyn match vbOperator "\s\+_$"
31313b7237SBram Moolenaar
32313b7237SBram Moolenaarsyn keyword vbBoolean  True False
33313b7237SBram Moolenaarsyn keyword vbConst Null Nothing
34313b7237SBram Moolenaar
35313b7237SBram Moolenaarsyn keyword vbRepeat Do For ForEach Loop Next
36313b7237SBram Moolenaarsyn keyword vbRepeat Step To Until Wend While
37313b7237SBram Moolenaar
38313b7237SBram Moolenaarsyn keyword vbEvents AccessKeyPress Activate ActiveRowChanged
39313b7237SBram Moolenaarsyn keyword vbEvents AfterAddFile AfterChangeFileName AfterCloseFile
40313b7237SBram Moolenaarsyn keyword vbEvents AfterColEdit AfterColUpdate AfterDelete
41313b7237SBram Moolenaarsyn keyword vbEvents AfterInsert AfterLabelEdit AfterRemoveFile
42313b7237SBram Moolenaarsyn keyword vbEvents AfterUpdate AfterWriteFile AmbientChanged
43313b7237SBram Moolenaarsyn keyword vbEvents ApplyChanges Associate AsyncProgress
44313b7237SBram Moolenaarsyn keyword vbEvents AsyncReadComplete AsyncReadProgress AxisActivated
45313b7237SBram Moolenaarsyn keyword vbEvents AxisLabelActivated AxisLabelSelected
46313b7237SBram Moolenaarsyn keyword vbEvents AxisLabelUpdated AxisSelected AxisTitleActivated
47313b7237SBram Moolenaarsyn keyword vbEvents AxisTitleSelected AxisTitleUpdated AxisUpdated
48313b7237SBram Moolenaarsyn keyword vbEvents BeforeClick BeforeColEdit BeforeColUpdate
49313b7237SBram Moolenaarsyn keyword vbEvents BeforeConnect BeforeDelete BeforeInsert
50313b7237SBram Moolenaarsyn keyword vbEvents BeforeLabelEdit BeforeLoadFile BeforeUpdate
51313b7237SBram Moolenaarsyn keyword vbEvents BeginRequest BeginTrans ButtonClick
52313b7237SBram Moolenaarsyn keyword vbEvents ButtonCompleted ButtonDropDown ButtonGotFocus
53313b7237SBram Moolenaarsyn keyword vbEvents ButtonLostFocus CallbackKeyDown Change Changed
54313b7237SBram Moolenaarsyn keyword vbEvents ChartActivated ChartSelected ChartUpdated Click
55313b7237SBram Moolenaarsyn keyword vbEvents Close CloseQuery CloseUp ColEdit ColResize
56313b7237SBram Moolenaarsyn keyword vbEvents Collapse ColumnClick CommitTrans Compare
57313b7237SBram Moolenaarsyn keyword vbEvents ConfigChageCancelled ConfigChanged
58313b7237SBram Moolenaarsyn keyword vbEvents ConfigChangedCancelled Connect ConnectionRequest
59313b7237SBram Moolenaarsyn keyword vbEvents CurrentRecordChanged DECommandAdded
60313b7237SBram Moolenaarsyn keyword vbEvents DECommandPropertyChanged DECommandRemoved
61313b7237SBram Moolenaarsyn keyword vbEvents DEConnectionAdded DEConnectionPropertyChanged
62313b7237SBram Moolenaarsyn keyword vbEvents DEConnectionRemoved DataArrival DataChanged
63313b7237SBram Moolenaarsyn keyword vbEvents DataUpdated DateClicked DblClick Deactivate
64313b7237SBram Moolenaarsyn keyword vbEvents DevModeChange DeviceArrival DeviceOtherEvent
65313b7237SBram Moolenaarsyn keyword vbEvents DeviceQueryRemove DeviceQueryRemoveFailed
66313b7237SBram Moolenaarsyn keyword vbEvents DeviceRemoveComplete DeviceRemovePending
67313b7237SBram Moolenaarsyn keyword vbEvents Disconnect DisplayChanged Dissociate
68313b7237SBram Moolenaarsyn keyword vbEvents DoGetNewFileName Done DonePainting DownClick
69313b7237SBram Moolenaarsyn keyword vbEvents DragDrop DragOver DropDown EditProperty EditQuery
70313b7237SBram Moolenaarsyn keyword vbEvents EndRequest EnterCell EnterFocus ExitFocus Expand
71313b7237SBram Moolenaarsyn keyword vbEvents FontChanged FootnoteActivated FootnoteSelected
72313b7237SBram Moolenaarsyn keyword vbEvents FootnoteUpdated Format FormatSize GotFocus
73313b7237SBram Moolenaarsyn keyword vbEvents HeadClick HeightChanged Hide InfoMessage
74313b7237SBram Moolenaarsyn keyword vbEvents IniProperties InitProperties Initialize
75313b7237SBram Moolenaarsyn keyword vbEvents ItemActivated ItemAdded ItemCheck ItemClick
76313b7237SBram Moolenaarsyn keyword vbEvents ItemReloaded ItemRemoved ItemRenamed
77313b7237SBram Moolenaarsyn keyword vbEvents ItemSeletected KeyDown KeyPress KeyUp LeaveCell
78313b7237SBram Moolenaarsyn keyword vbEvents LegendActivated LegendSelected LegendUpdated
79313b7237SBram Moolenaarsyn keyword vbEvents LinkClose LinkError LinkExecute LinkNotify
80313b7237SBram Moolenaarsyn keyword vbEvents LinkOpen Load LostFocus MouseDown MouseMove
81313b7237SBram Moolenaarsyn keyword vbEvents MouseUp NodeCheck NodeClick OLECompleteDrag
82313b7237SBram Moolenaarsyn keyword vbEvents OLEDragDrop OLEDragOver OLEGiveFeedback OLESetData
83313b7237SBram Moolenaarsyn keyword vbEvents OLEStartDrag ObjectEvent ObjectMove OnAddNew
84313b7237SBram Moolenaarsyn keyword vbEvents OnComm Paint PanelClick PanelDblClick PathChange
85313b7237SBram Moolenaarsyn keyword vbEvents PatternChange PlotActivated PlotSelected
86313b7237SBram Moolenaarsyn keyword vbEvents PlotUpdated PointActivated PointLabelActivated
87313b7237SBram Moolenaarsyn keyword vbEvents PointLabelSelected PointLabelUpdated PointSelected
88313b7237SBram Moolenaarsyn keyword vbEvents PointUpdated PowerQuerySuspend PowerResume
89313b7237SBram Moolenaarsyn keyword vbEvents PowerStatusChanged PowerSuspend ProcessTag
90313b7237SBram Moolenaarsyn keyword vbEvents ProcessingTimeout QueryChangeConfig QueryClose
91313b7237SBram Moolenaarsyn keyword vbEvents QueryComplete QueryCompleted QueryTimeout
92313b7237SBram Moolenaarsyn keyword vbEvents QueryUnload ReadProperties RepeatedControlLoaded
93313b7237SBram Moolenaarsyn keyword vbEvents RepeatedControlUnloaded Reposition
94313b7237SBram Moolenaarsyn keyword vbEvents RequestChangeFileName RequestWriteFile Resize
95313b7237SBram Moolenaarsyn keyword vbEvents ResultsChanged RetainedProject RollbackTrans
96313b7237SBram Moolenaarsyn keyword vbEvents RowColChange RowCurrencyChange RowResize
97313b7237SBram Moolenaarsyn keyword vbEvents RowStatusChanged Scroll SelChange SelectionChanged
98313b7237SBram Moolenaarsyn keyword vbEvents SendComplete SendProgress SeriesActivated
99313b7237SBram Moolenaarsyn keyword vbEvents SeriesSelected SeriesUpdated SettingChanged Show
100313b7237SBram Moolenaarsyn keyword vbEvents SplitChange Start StateChanged StatusUpdate
101313b7237SBram Moolenaarsyn keyword vbEvents SysColorsChanged Terminate TimeChanged Timer
102313b7237SBram Moolenaarsyn keyword vbEvents TitleActivated TitleSelected TitleUpdated
103313b7237SBram Moolenaarsyn keyword vbEvents UnboundAddData UnboundDeleteRow
104313b7237SBram Moolenaarsyn keyword vbEvents UnboundGetRelativeBookmark UnboundReadData
105313b7237SBram Moolenaarsyn keyword vbEvents UnboundWriteData Unformat Unload UpClick Updated
106313b7237SBram Moolenaarsyn keyword vbEvents UserEvent Validate ValidationError
107313b7237SBram Moolenaarsyn keyword vbEvents VisibleRecordChanged WillAssociate WillChangeData
108313b7237SBram Moolenaarsyn keyword vbEvents WillDissociate WillExecute WillUpdateRows
109313b7237SBram Moolenaarsyn keyword vbEvents WriteProperties
110313b7237SBram Moolenaar
111313b7237SBram Moolenaar
112313b7237SBram Moolenaarsyn keyword vbFunction Abs Array Asc AscB AscW Atn Avg BOF CBool CByte
113313b7237SBram Moolenaarsyn keyword vbFunction CCur CDate CDbl CInt CLng CSng CStr CVDate CVErr
114313b7237SBram Moolenaarsyn keyword vbFunction CVar CallByName Cdec Choose Chr ChrB ChrW Command
115313b7237SBram Moolenaarsyn keyword vbFunction Cos Count CreateObject CurDir DDB Date DateAdd
116313b7237SBram Moolenaarsyn keyword vbFunction DateDiff DatePart DateSerial DateValue Day Dir
117313b7237SBram Moolenaarsyn keyword vbFunction DoEvents EOF Environ Error Exp FV FileAttr
118313b7237SBram Moolenaarsyn keyword vbFunction FileDateTime FileLen FilterFix Fix Format
119313b7237SBram Moolenaarsyn keyword vbFunction FormatCurrency FormatDateTime FormatNumber
120313b7237SBram Moolenaarsyn keyword vbFunction FormatPercent FreeFile GetAllStrings GetAttr
121313b7237SBram Moolenaarsyn keyword vbFunction GetAutoServerSettings GetObject GetSetting Hex
122313b7237SBram Moolenaarsyn keyword vbFunction Hour IIf IMEStatus IPmt InStr Input InputB
123313b7237SBram Moolenaarsyn keyword vbFunction InputBox InstrB Int IsArray IsDate IsEmpty IsError
124313b7237SBram Moolenaarsyn keyword vbFunction IsMissing IsNull IsNumeric IsObject Join LBound
125313b7237SBram Moolenaarsyn keyword vbFunction LCase LOF LTrim Left LeftB Len LenB LoadPicture
126313b7237SBram Moolenaarsyn keyword vbFunction LoadResData LoadResPicture LoadResString Loc Log
127313b7237SBram Moolenaarsyn keyword vbFunction MIRR Max Mid MidB Min Minute Month MonthName
128313b7237SBram Moolenaarsyn keyword vbFunction MsgBox NPV NPer Now Oct PPmt PV Partition Pmt
129313b7237SBram Moolenaarsyn keyword vbFunction QBColor RGB RTrim Rate Replace Right RightB Rnd
130313b7237SBram Moolenaarsyn keyword vbFunction Round SLN SYD Second Seek Sgn Shell Sin Space Spc
131313b7237SBram Moolenaarsyn keyword vbFunction Split Sqr StDev StDevP Str StrComp StrConv
132313b7237SBram Moolenaarsyn keyword vbFunction StrReverse String Sum Switch Tab Tan Time
133313b7237SBram Moolenaarsyn keyword vbFunction TimeSerial TimeValue Timer Trim TypeName UBound
134313b7237SBram Moolenaarsyn keyword vbFunction UCase Val Var VarP VarType Weekday WeekdayName
135313b7237SBram Moolenaarsyn keyword vbFunction Year
136313b7237SBram Moolenaar
137313b7237SBram Moolenaarsyn keyword vbMethods AboutBox Accept Activate Add AddCustom AddFile
138313b7237SBram Moolenaarsyn keyword vbMethods AddFromFile AddFromGuid AddFromString
139313b7237SBram Moolenaarsyn keyword vbMethods AddFromTemplate AddItem AddNew AddToAddInToolbar
140313b7237SBram Moolenaarsyn keyword vbMethods AddToolboxProgID Append AppendAppendChunk
141313b7237SBram Moolenaarsyn keyword vbMethods AppendChunk Arrange Assert AsyncRead BatchUpdate
142313b7237SBram Moolenaarsyn keyword vbMethods BeginQueryEdit BeginTrans Bind BuildPath
143313b7237SBram Moolenaarsyn keyword vbMethods CanPropertyChange Cancel CancelAsyncRead
144313b7237SBram Moolenaarsyn keyword vbMethods CancelBatch CancelUpdate CaptureImage CellText
145313b7237SBram Moolenaarsyn keyword vbMethods CellValue Circle Clear ClearFields ClearSel
146313b7237SBram Moolenaarsyn keyword vbMethods ClearSelCols ClearStructure Clone Close Cls
147313b7237SBram Moolenaarsyn keyword vbMethods ColContaining CollapseAll ColumnSize CommitTrans
148313b7237SBram Moolenaarsyn keyword vbMethods CompactDatabase Compose Connect Copy CopyFile
149313b7237SBram Moolenaarsyn keyword vbMethods CopyFolder CopyQueryDef Count CreateDatabase
150313b7237SBram Moolenaarsyn keyword vbMethods CreateDragImage CreateEmbed CreateField
151313b7237SBram Moolenaarsyn keyword vbMethods CreateFolder CreateGroup CreateIndex CreateLink
152313b7237SBram Moolenaarsyn keyword vbMethods CreatePreparedStatement CreatePropery CreateQuery
153313b7237SBram Moolenaarsyn keyword vbMethods CreateQueryDef CreateRelation CreateTableDef
154313b7237SBram Moolenaarsyn keyword vbMethods CreateTextFile CreateToolWindow CreateUser
155313b7237SBram Moolenaarsyn keyword vbMethods CreateWorkspace Customize Cut Delete
156313b7237SBram Moolenaarsyn keyword vbMethods DeleteColumnLabels DeleteColumns DeleteFile
157313b7237SBram Moolenaarsyn keyword vbMethods DeleteFolder DeleteLines DeleteRowLabels
158313b7237SBram Moolenaarsyn keyword vbMethods DeleteRows DeselectAll DesignerWindow DoVerb Drag
159313b7237SBram Moolenaarsyn keyword vbMethods Draw DriveExists Edit EditCopy EditPaste EndDoc
160313b7237SBram Moolenaarsyn keyword vbMethods EnsureVisible EstablishConnection Execute Exists
161313b7237SBram Moolenaarsyn keyword vbMethods Expand Export ExportReport ExtractIcon Fetch
162313b7237SBram Moolenaarsyn keyword vbMethods FetchVerbs FileExists Files FillCache Find
163313b7237SBram Moolenaarsyn keyword vbMethods FindFirst FindItem FindLast FindNext FindPrevious
164313b7237SBram Moolenaarsyn keyword vbMethods FolderExists Forward GetAbsolutePathName
165313b7237SBram Moolenaarsyn keyword vbMethods GetBaseName GetBookmark GetChunk GetClipString
166313b7237SBram Moolenaarsyn keyword vbMethods GetData GetDrive GetDriveName GetFile GetFileName
167313b7237SBram Moolenaarsyn keyword vbMethods GetFirstVisible GetFolder GetFormat GetHeader
168313b7237SBram Moolenaarsyn keyword vbMethods GetLineFromChar GetNumTicks GetParentFolderName
169313b7237SBram Moolenaarsyn keyword vbMethods GetRows GetSelectedPart GetSelection
170313b7237SBram Moolenaarsyn keyword vbMethods GetSpecialFolder GetTempName GetText
171313b7237SBram Moolenaarsyn keyword vbMethods GetVisibleCount GoBack GoForward Hide HitTest
172313b7237SBram Moolenaarsyn keyword vbMethods HoldFields Idle Import InitializeLabels Insert
173313b7237SBram Moolenaarsyn keyword vbMethods InsertColumnLabels InsertColumns InsertFile
174313b7237SBram Moolenaarsyn keyword vbMethods InsertLines InsertObjDlg InsertRowLabels
175313b7237SBram Moolenaarsyn keyword vbMethods InsertRows Item Keys KillDoc Layout Line Lines
176313b7237SBram Moolenaarsyn keyword vbMethods LinkExecute LinkPoke LinkRequest LinkSend Listen
177313b7237SBram Moolenaarsyn keyword vbMethods LoadFile LoadResData LoadResPicture LoadResString
178313b7237SBram Moolenaarsyn keyword vbMethods LogEvent MakeCompileFile MakeCompiledFile
179313b7237SBram Moolenaarsyn keyword vbMethods MakeReplica MoreResults Move MoveData MoveFile
180313b7237SBram Moolenaarsyn keyword vbMethods MoveFirst MoveFolder MoveLast MoveNext
181313b7237SBram Moolenaarsyn keyword vbMethods MovePrevious NavigateTo NewPage NewPassword
182313b7237SBram Moolenaarsyn keyword vbMethods NextRecordset OLEDrag OnAddinsUpdate OnConnection
183313b7237SBram Moolenaarsyn keyword vbMethods OnDisconnection OnStartupComplete Open
184313b7237SBram Moolenaarsyn keyword vbMethods OpenAsTextStream OpenConnection OpenDatabase
185313b7237SBram Moolenaarsyn keyword vbMethods OpenQueryDef OpenRecordset OpenResultset OpenURL
186313b7237SBram Moolenaarsyn keyword vbMethods Overlay PSet PaintPicture PastSpecialDlg Paste
187313b7237SBram Moolenaarsyn keyword vbMethods PeekData Play Point PopulatePartial PopupMenu
188313b7237SBram Moolenaarsyn keyword vbMethods Print PrintForm PrintReport PropertyChanged Quit
189313b7237SBram Moolenaarsyn keyword vbMethods Raise RandomDataFill RandomFillColumns
190313b7237SBram Moolenaarsyn keyword vbMethods RandomFillRows ReFill Read ReadAll ReadFromFile
191313b7237SBram Moolenaarsyn keyword vbMethods ReadLine ReadProperty Rebind Refresh RefreshLink
192313b7237SBram Moolenaarsyn keyword vbMethods RegisterDatabase ReleaseInstance Reload Remove
193313b7237SBram Moolenaarsyn keyword vbMethods RemoveAddInFromToolbar RemoveAll RemoveItem Render
194313b7237SBram Moolenaarsyn keyword vbMethods RepairDatabase ReplaceLine Reply ReplyAll Requery
195313b7237SBram Moolenaarsyn keyword vbMethods ResetCustom ResetCustomLabel ResolveName
196313b7237SBram Moolenaarsyn keyword vbMethods RestoreToolbar Resync Rollback RollbackTrans
197313b7237SBram Moolenaarsyn keyword vbMethods RowBookmark RowContaining RowTop Save SaveAs
198313b7237SBram Moolenaarsyn keyword vbMethods SaveFile SaveToFile SaveToOle1File SaveToolbar
199313b7237SBram Moolenaarsyn keyword vbMethods Scale ScaleX ScaleY Scroll SelPrint SelectAll
200313b7237SBram Moolenaarsyn keyword vbMethods SelectPart Send SendData Set SetAutoServerSettings
201313b7237SBram Moolenaarsyn keyword vbMethods SetData SetFocus SetOption SetSelection SetSize
202313b7237SBram Moolenaarsyn keyword vbMethods SetText SetViewport Show ShowColor ShowFont
203313b7237SBram Moolenaarsyn keyword vbMethods ShowHelp ShowOpen ShowPrinter ShowSave
204313b7237SBram Moolenaarsyn keyword vbMethods ShowWhatsThis SignOff SignOn Size Skip SkipLine
205313b7237SBram Moolenaarsyn keyword vbMethods Span Split SplitContaining StartLabelEdit
206313b7237SBram Moolenaarsyn keyword vbMethods StartLogging Stop Synchronize Tag TextHeight
207313b7237SBram Moolenaarsyn keyword vbMethods TextWidth ToDefaults Trace TwipsToChartPart
208313b7237SBram Moolenaarsyn keyword vbMethods TypeByChartType URLFor Update UpdateControls
209313b7237SBram Moolenaarsyn keyword vbMethods UpdateRecord UpdateRow Upto ValidateControls Value
210313b7237SBram Moolenaarsyn keyword vbMethods WhatsThisMode Write WriteBlankLines WriteLine
211313b7237SBram Moolenaarsyn keyword vbMethods WriteProperty WriteTemplate ZOrder
212313b7237SBram Moolenaarsyn keyword vbMethods rdoCreateEnvironment rdoRegisterDataSource
213313b7237SBram Moolenaar
214313b7237SBram Moolenaarsyn keyword vbStatement Alias AppActivate As Base Beep Begin Call ChDir
215313b7237SBram Moolenaarsyn keyword vbStatement ChDrive Close Const Date Declare DefBool DefByte
216313b7237SBram Moolenaarsyn keyword vbStatement DefCur DefDate DefDbl DefDec DefInt DefLng DefObj
217313b7237SBram Moolenaarsyn keyword vbStatement DefSng DefStr DefVar Deftype DeleteSetting Dim Do
218313b7237SBram Moolenaarsyn keyword vbStatement Each ElseIf End Enum Erase Error Event Exit
219313b7237SBram Moolenaarsyn keyword vbStatement Explicit FileCopy For ForEach Function Get GoSub
220313b7237SBram Moolenaarsyn keyword vbStatement GoTo Gosub Implements Kill LSet Let Lib LineInput
221313b7237SBram Moolenaarsyn keyword vbStatement Load Lock Loop Mid MkDir Name Next On OnError Open
222313b7237SBram Moolenaarsyn keyword vbStatement Option Preserve Private Property Public Put RSet
223f9132810SBram Moolenaarsyn keyword vbStatement RaiseEvent Randomize ReDim Redim Reset Resume
224313b7237SBram Moolenaarsyn keyword vbStatement Return RmDir SavePicture SaveSetting Seek SendKeys
225313b7237SBram Moolenaarsyn keyword vbStatement Sendkeys Set SetAttr Static Step Stop Sub Time
226313b7237SBram Moolenaarsyn keyword vbStatement Type Unload Unlock Until Wend While Width With
227313b7237SBram Moolenaarsyn keyword vbStatement Write
228313b7237SBram Moolenaar
229313b7237SBram Moolenaarsyn keyword vbKeyword As Binary ByRef ByVal Date Empty Error Friend Get
230313b7237SBram Moolenaarsyn keyword vbKeyword Input Is Len Lock Me Mid New Nothing Null On
231313b7237SBram Moolenaarsyn keyword vbKeyword Option Optional ParamArray Print Private Property
232313b7237SBram Moolenaarsyn keyword vbKeyword Public PublicNotCreateable OnNewProcessSingleUse
233313b7237SBram Moolenaarsyn keyword vbKeyword InSameProcessMultiUse GlobalMultiUse Resume Seek
234313b7237SBram Moolenaarsyn keyword vbKeyword Set Static Step String Time WithEvents
235071d4279SBram Moolenaar
236071d4279SBram Moolenaarsyn keyword vbTodo contained	TODO
237071d4279SBram Moolenaar
238313b7237SBram Moolenaar"Datatypes
239313b7237SBram Moolenaarsyn keyword vbTypes Boolean Byte Currency Date Decimal Double Empty
240313b7237SBram Moolenaarsyn keyword vbTypes Integer Long Object Single String Variant
241313b7237SBram Moolenaar
242313b7237SBram Moolenaar"VB defined values
243313b7237SBram Moolenaarsyn keyword vbDefine dbBigInt dbBinary dbBoolean dbByte dbChar
244313b7237SBram Moolenaarsyn keyword vbDefine dbCurrency dbDate dbDecimal dbDouble dbFloat
245313b7237SBram Moolenaarsyn keyword vbDefine dbGUID dbInteger dbLong dbLongBinary dbMemo
246313b7237SBram Moolenaarsyn keyword vbDefine dbNumeric dbSingle dbText dbTime dbTimeStamp
247313b7237SBram Moolenaarsyn keyword vbDefine dbVarBinary
248313b7237SBram Moolenaar
249313b7237SBram Moolenaar"VB defined values
250313b7237SBram Moolenaarsyn keyword vbDefine vb3DDKShadow vb3DFace vb3DHighlight vb3DLight
251313b7237SBram Moolenaarsyn keyword vbDefine vb3DShadow vbAbort vbAbortRetryIgnore
252313b7237SBram Moolenaarsyn keyword vbDefine vbActiveBorder vbActiveTitleBar vbAlias
253313b7237SBram Moolenaarsyn keyword vbDefine vbApplicationModal vbApplicationWorkspace
254313b7237SBram Moolenaarsyn keyword vbDefine vbAppTaskManager vbAppWindows vbArchive vbArray
255313b7237SBram Moolenaarsyn keyword vbDefine vbBack vbBinaryCompare vbBlack vbBlue vbBoolean
256313b7237SBram Moolenaarsyn keyword vbDefine vbButtonFace vbButtonShadow vbButtonText vbByte
257313b7237SBram Moolenaarsyn keyword vbDefine vbCalGreg vbCalHijri vbCancel vbCr vbCritical
258313b7237SBram Moolenaarsyn keyword vbDefine vbCrLf vbCurrency vbCyan vbDatabaseCompare
259313b7237SBram Moolenaarsyn keyword vbDefine vbDataObject vbDate vbDecimal vbDefaultButton1
260313b7237SBram Moolenaarsyn keyword vbDefine vbDefaultButton2 vbDefaultButton3 vbDefaultButton4
261313b7237SBram Moolenaarsyn keyword vbDefine vbDesktop vbDirectory vbDouble vbEmpty vbError
262313b7237SBram Moolenaarsyn keyword vbDefine vbExclamation vbFirstFourDays vbFirstFullWeek
263313b7237SBram Moolenaarsyn keyword vbDefine vbFirstJan1 vbFormCode vbFormControlMenu
264313b7237SBram Moolenaarsyn keyword vbDefine vbFormFeed vbFormMDIForm vbFriday vbFromUnicode
265313b7237SBram Moolenaarsyn keyword vbDefine vbGrayText vbGreen vbHidden vbHide vbHighlight
266313b7237SBram Moolenaarsyn keyword vbDefine vbHighlightText vbHiragana vbIgnore vbIMEAlphaDbl
267313b7237SBram Moolenaarsyn keyword vbDefine vbIMEAlphaSng vbIMEDisable vbIMEHiragana
268313b7237SBram Moolenaarsyn keyword vbDefine vbIMEKatakanaDbl vbIMEKatakanaSng vbIMEModeAlpha
269313b7237SBram Moolenaarsyn keyword vbDefine vbIMEModeAlphaFull vbIMEModeDisable
270313b7237SBram Moolenaarsyn keyword vbDefine vbIMEModeHangul vbIMEModeHangulFull
271313b7237SBram Moolenaarsyn keyword vbDefine vbIMEModeHiragana vbIMEModeKatakana
272313b7237SBram Moolenaarsyn keyword vbDefine vbIMEModeKatakanaHalf vbIMEModeNoControl
273313b7237SBram Moolenaarsyn keyword vbDefine vbIMEModeOff vbIMEModeOn vbIMENoOp vbIMEOff
274313b7237SBram Moolenaarsyn keyword vbDefine vbIMEOn vbInactiveBorder vbInactiveCaptionText
275313b7237SBram Moolenaarsyn keyword vbDefine vbInactiveTitleBar vbInfoBackground vbInformation
276313b7237SBram Moolenaarsyn keyword vbDefine vbInfoText vbInteger vbKatakana vbKey0 vbKey1
277313b7237SBram Moolenaarsyn keyword vbDefine vbKey2 vbKey3 vbKey4 vbKey5 vbKey6 vbKey7 vbKey8
278313b7237SBram Moolenaarsyn keyword vbDefine vbKey9 vbKeyA vbKeyAdd vbKeyB vbKeyBack vbKeyC
279313b7237SBram Moolenaarsyn keyword vbDefine vbKeyCancel vbKeyCapital vbKeyClear vbKeyControl
280313b7237SBram Moolenaarsyn keyword vbDefine vbKeyD vbKeyDecimal vbKeyDelete vbKeyDivide
281313b7237SBram Moolenaarsyn keyword vbDefine vbKeyDown vbKeyE vbKeyEnd vbKeyEscape vbKeyExecute
282313b7237SBram Moolenaarsyn keyword vbDefine vbKeyF vbKeyF1 vbKeyF10 vbKeyF11 vbKeyF12 vbKeyF13
283313b7237SBram Moolenaarsyn keyword vbDefine vbKeyF14 vbKeyF15 vbKeyF16 vbKeyF2 vbKeyF3 vbKeyF4
284313b7237SBram Moolenaarsyn keyword vbDefine vbKeyF5 vbKeyF6 vbKeyF7 vbKeyF8 vbKeyF9 vbKeyG
285313b7237SBram Moolenaarsyn keyword vbDefine vbKeyH vbKeyHelp vbKeyHome vbKeyI vbKeyInsert
286313b7237SBram Moolenaarsyn keyword vbDefine vbKeyJ vbKeyK vbKeyL vbKeyLButton vbKeyLeft vbKeyM
287313b7237SBram Moolenaarsyn keyword vbDefine vbKeyMButton vbKeyMenu vbKeyMultiply vbKeyN
288313b7237SBram Moolenaarsyn keyword vbDefine vbKeyNumlock vbKeyNumpad0 vbKeyNumpad1
289313b7237SBram Moolenaarsyn keyword vbDefine vbKeyNumpad2 vbKeyNumpad3 vbKeyNumpad4
290313b7237SBram Moolenaarsyn keyword vbDefine vbKeyNumpad5 vbKeyNumpad6 vbKeyNumpad7
291313b7237SBram Moolenaarsyn keyword vbDefine vbKeyNumpad8 vbKeyNumpad9 vbKeyO vbKeyP
292313b7237SBram Moolenaarsyn keyword vbDefine vbKeyPageDown vbKeyPageUp vbKeyPause vbKeyPrint
293313b7237SBram Moolenaarsyn keyword vbDefine vbKeyQ vbKeyR vbKeyRButton vbKeyReturn vbKeyRight
294313b7237SBram Moolenaarsyn keyword vbDefine vbKeyS vbKeySelect vbKeySeparator vbKeyShift
295313b7237SBram Moolenaarsyn keyword vbDefine vbKeySnapshot vbKeySpace vbKeySubtract vbKeyT
296313b7237SBram Moolenaarsyn keyword vbDefine vbKeyTab vbKeyU vbKeyUp vbKeyV vbKeyW vbKeyX
297313b7237SBram Moolenaarsyn keyword vbDefine vbKeyY vbKeyZ vbLf vbLong vbLowerCase vbMagenta
298313b7237SBram Moolenaarsyn keyword vbDefine vbMaximizedFocus vbMenuBar vbMenuText
299313b7237SBram Moolenaarsyn keyword vbDefine vbMinimizedFocus vbMinimizedNoFocus vbMonday
300313b7237SBram Moolenaarsyn keyword vbDefine vbMsgBox vbMsgBoxHelpButton vbMsgBoxRight
301313b7237SBram Moolenaarsyn keyword vbDefine vbMsgBoxRtlReading vbMsgBoxSetForeground
302313b7237SBram Moolenaarsyn keyword vbDefine vbMsgBoxText vbNarrow vbNewLine vbNo vbNormal
303313b7237SBram Moolenaarsyn keyword vbDefine vbNormalFocus vbNormalNoFocus vbNull vbNullChar
304313b7237SBram Moolenaarsyn keyword vbDefine vbNullString vbObject vbObjectError vbOK
305313b7237SBram Moolenaarsyn keyword vbDefine vbOKCancel vbOKOnly vbProperCase vbQuestion
306313b7237SBram Moolenaarsyn keyword vbDefine vbReadOnly vbRed vbRetry vbRetryCancel vbSaturday
307313b7237SBram Moolenaarsyn keyword vbDefine vbScrollBars vbSingle vbString vbSunday vbSystem
308313b7237SBram Moolenaarsyn keyword vbDefine vbSystemModal vbTab vbTextCompare vbThursday
309313b7237SBram Moolenaarsyn keyword vbDefine vbTitleBarText vbTuesday vbUnicode vbUpperCase
310313b7237SBram Moolenaarsyn keyword vbDefine vbUseSystem vbUseSystemDayOfWeek vbVariant
311313b7237SBram Moolenaarsyn keyword vbDefine vbVerticalTab vbVolume vbWednesday vbWhite vbWide
312313b7237SBram Moolenaarsyn keyword vbDefine vbWindowBackground vbWindowFrame vbWindowText
313313b7237SBram Moolenaarsyn keyword vbDefine vbYellow vbYes vbYesNo vbYesNoCancel
314313b7237SBram Moolenaar
315313b7237SBram Moolenaar"Numbers
316071d4279SBram Moolenaar"integer number, or floating point number without a dot.
317071d4279SBram Moolenaarsyn match vbNumber "\<\d\+\>"
318071d4279SBram Moolenaar"floating point number, with dot
319071d4279SBram Moolenaarsyn match vbNumber "\<\d\+\.\d*\>"
320071d4279SBram Moolenaar"floating point number, starting with a dot
321071d4279SBram Moolenaarsyn match vbNumber "\.\d\+\>"
322313b7237SBram Moolenaar"syn match  vbNumber		"{[[:xdigit:]-]\+}\|&[hH][[:xdigit:]]\+&"
323313b7237SBram Moolenaar"syn match  vbNumber		":[[:xdigit:]]\+"
324313b7237SBram Moolenaar"syn match  vbNumber		"[-+]\=\<\d\+\>"
325313b7237SBram Moolenaarsyn match  vbFloat		"[-+]\=\<\d\+[eE][\-+]\=\d\+"
326313b7237SBram Moolenaarsyn match  vbFloat		"[-+]\=\<\d\+\.\d*\([eE][\-+]\=\d\+\)\="
327313b7237SBram Moolenaarsyn match  vbFloat		"[-+]\=\<\.\d\+\([eE][\-+]\=\d\+\)\="
328071d4279SBram Moolenaar
329071d4279SBram Moolenaar" String and Character contstants
330313b7237SBram Moolenaarsyn region  vbString		start=+"+  end=+"\|$+
331313b7237SBram Moolenaarsyn region  vbComment		start="\(^\|\s\)REM\s" end="$" contains=vbTodo
332313b7237SBram Moolenaarsyn region  vbComment		start="\(^\|\s\)\'"   end="$" contains=vbTodo
333313b7237SBram Moolenaarsyn match   vbLineNumber	"^\d\+\(\s\|$\)"
334071d4279SBram Moolenaarsyn match   vbTypeSpecifier  "[a-zA-Z0-9][\$%&!#]"ms=s+1
335313b7237SBram Moolenaarsyn match   vbTypeSpecifier  "#[a-zA-Z0-9]"me=e-1
336071d4279SBram Moolenaar
337071d4279SBram Moolenaar" Define the default highlighting.
33889bcfda6SBram Moolenaar" Only when an item doesn't have highlighting yet
339071d4279SBram Moolenaar
340*f37506f6SBram Moolenaarhi def link vbBoolean		Boolean
341*f37506f6SBram Moolenaarhi def link vbLineNumber		Comment
342*f37506f6SBram Moolenaarhi def link vbComment		Comment
343*f37506f6SBram Moolenaarhi def link vbConditional	Conditional
344*f37506f6SBram Moolenaarhi def link vbConst			Constant
345*f37506f6SBram Moolenaarhi def link vbDefine			Constant
346*f37506f6SBram Moolenaarhi def link vbError			Error
347*f37506f6SBram Moolenaarhi def link vbFunction		Identifier
348*f37506f6SBram Moolenaarhi def link vbIdentifier		Identifier
349*f37506f6SBram Moolenaarhi def link vbNumber			Number
350*f37506f6SBram Moolenaarhi def link vbFloat			Float
351*f37506f6SBram Moolenaarhi def link vbMethods		PreProc
352*f37506f6SBram Moolenaarhi def link vbOperator		Operator
353*f37506f6SBram Moolenaarhi def link vbRepeat			Repeat
354*f37506f6SBram Moolenaarhi def link vbString			String
355*f37506f6SBram Moolenaarhi def link vbStatement		Statement
356*f37506f6SBram Moolenaarhi def link vbKeyword		Statement
357*f37506f6SBram Moolenaarhi def link vbEvents			Special
358*f37506f6SBram Moolenaarhi def link vbTodo			Todo
359*f37506f6SBram Moolenaarhi def link vbTypes			Type
360*f37506f6SBram Moolenaarhi def link vbTypeSpecifier	Type
361071d4279SBram Moolenaar
362071d4279SBram Moolenaar
363071d4279SBram Moolenaarlet b:current_syntax = "vb"
364071d4279SBram Moolenaar
365071d4279SBram Moolenaar" vim: ts=8
366