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