# Define SciTE settings for VB files. # Add vba Keywords - Hint - all keywords have to be lowercase # imJuli2016- Marcedo@habmalneFrage.de # BAS: Module, FRM: Form, CLS: Class Module, CTL: User Control # PAG: Property Page, DSR: Data Report, DOB: User Document file.patterns.vb=*.vb;*.bas;*.frm;*.cls;*.ctl;*.pag;*.dsr;*.dob # VBS: VBScript, DSM: Visual[ex. Dev] Studio macro file.patterns.wscript=*.vbs;*.dsm *source.patterns.vb=$(file.patterns.vb);$(file.patterns.wscript); # VBP: VB Project, VBG: VB Project Group (ActiveX), MAK: old (VB3) project file, VBW: VB Workspace filter.vb=VB (vb vbp vbs bas frm cls ctl pag dsr dob)|$(file.patterns.vb);$(file.patterns.wscript);*.vbp;*.vbg;*.mak;*.vbw| *filter.vb=$(filter.vb) lexer.$(file.patterns.vb)=vb lexer.$(file.patterns.wscript)=vbscript *language.vb=&VB|vb|| #*language.vbscript=VBScr&ipt|vbs|| word.characters.$(file.patterns.vb)=$(chars.alpha)$(chars.numeric)-'# autocomplete.vb.start.characters=$(chars.alpha)$(chars.numeric)$_< autocomplete.vb.ignorecase=1 calltip.vb.end.definition=) calltip.vb.parameters.start=( calltip.vb.parameters.separators=, calltip.vb.parameters.end=) calltip.vb.ignorecase=1 #------ \t\n makes a calltip multiline calltip.vb.use.escapes=1 #api.$(file.patterns.vb)=\ #$(SciteDefaultHome)/api/vba_07_2016.api;\ #$(SciteDefaultHome)/user/languages/vba_07_2016.api # Keywords, operators, statements, data types and some words in .frm files keywordclass.vb6=\ addressof alias and as attribute base begin binary boolean byref byte byval call case cdbl \ cint clng compare const csng cstr currency date decimal declare defbool defbyte defcur \ defdate defdbl defdec defint deflng defobj defsng defstr defvar dim do double each else \ elseif empty end enum eqv erase error event exit explicit false for friend function get \ global gosub goto if imp implements in input integer is len let lib like load lock long \ loop lset me mid midb mod new next not nothing null object on option optional or paramarray \ preserve print private property public raiseevent randomize redim rem resume return rset \ seek select set single static step stop string sub text then time to true type typeof \ unload until variant wend while with withevents xor #https://msdn.microsoft.com/de-de/library/microsoft.visualbasic.constants_fields(v=vs.110).aspx keywordclass.vbConstants= \ vbabort vbabortretryignore vbapplicationmodal vbarchive vbarray vbback vbbinarycompare vbboolean vbbyte vbcancel \ vbcr vbcritical vbcrlf vbcurrency vbdate vbdecimal vbdefaultbutton1 vbdefaultbutton2 vbdefaultbutton3 vbdirectory \ vbdouble vbempty vbexclamation vbfalse vbfirstfourdays vbfirstfullweek vbfirstjan1 vbformfeed vbfriday vbgeneraldate \ vbget vbhidden vbhide vbhiragana vbignore vbinformation vbinteger vbkatakana vblet vblf vblinguisticcasing vblong \ vblongdate vblongtime vblowercase vbmaximizedfocus vbmethod vbminimizedfocus vbminimizednofocus vbmonday vbmsgboxhelp \ vbmsgboxright vbmsgboxrtlreading vbmsgboxsetforeground vbnarrow vbnewline vbno vbnormal vbnormalfocus vbnormalnofocus \ vbnull vbnullchar vbnullstring vbobject vbobjecterror vbok vbokcancel vbokonly vbpropercase vbquestion vbreadonly vbretry \ vbretrycancel vbsaturday vbset vbshortdate vbshorttime vbsimplifiedchinese vbsingle vbstring vbsunday vbsystem vbsystemmodal \ vbtab vbtextcompare vbthursday vbtraditionalchinese vbtrue vbtuesday vbuppercase vbusedefault vbuserdefinedtype vbusesystem \ vbusesystemdayofweek vbvariant vbverticaltab vbvolume vbwednesday vbwide vbyes vbyesno vbyesnocancel # html.properties picks up VB keywords from keywordclass.vb keywordclass.vb=$(keywordclass.vb6) $(keywordclass.vbConstants) # Mostly system statements (files, registry, I/O...) that # I am not sure to include with the regular statements. keywordclass.vbotherstatements=\ appactivate beep chdir chdrive close filecopy get input kill line unlock mkdir name \ open print put reset rmdir savepicture savesetting seek sendkeys setattr width write # VBNet specific keywords keywordclass.vbnet=\ addhandler andalso ansi assembly auto catch cbool cbyte cchar cdate cdec char class \ cobj continue csbyte cshort ctype cuint culng cushort custom default delegate directcast \ endif externalsource finally gettype handles imports inherits interface isfalse isnot \ istrue module mustinherit mustoverride my mybase myclass namespace narrowing notinheritable \ notoverridable of off operator orelse overloads overridable overrides partial protected \ readonly region removehandler sbyte shadows shared short strict structure synclock \ throw try trycast uinteger ulong unicode ushort using when widening writeonly # Code Flow & reserved Keywords using unnumbered style keywordclass.vba=\ binary byref byval date else empty error false for friend get input is len let lock me mid new next nothing null on option optional paramarray print private property ptrsafe public resume seek set static step string then time to true withevents # Functions / Methods using Style 2 keywordclass.vba2=\ binary byref byval date else empty error false for friend get input is len let lock me mid new next nothing null on abs array asc atn callbyname choose chr command conversion cos createobject curdir cverr date dateadd datediff datepart dateserial datevalue day ddb derived dir doevents environ eof error exp fileattr filedatetime filelen filter format formatcurrency formatdatetime formatnumber formatpercent freefile fv getallsettings getattr getobject getsetting hex hour iif imestatus input inputbox instr instrrev int, ipmt irr isarray isdate isempty iserror ismissing isnull isnumeric isobject join lbound lcase left len loc lof log ltrim, macid macscript math mid minute mirr month monthname msgbox now nper npv oct partition pmt ppmt pv qbcolor rate replace rgb right rnd round second seek sgn shell sin sln space spc split sqr str strcomp strconv string strreverse switch syd tab tan time timer timeserial timevalue type typename ubound ucase val vartype weekday weekdayname year # Objects using Style 4 keywordclass.vba4=\ collection debug dictionary drive drives err file files fileSystemObject folder folders textStream userForm # add them below, if you need support for : $(keywordclass.vb6) $(keywordclass.vbotherstatements) keywords.$(file.patterns.vb)=$(keywordclass.vba4) $(keywordclass.vba2) $(keywordclass.vba) # red - flow of control aka if else do loop .... keywords4.$(file.patterns.vb)= # specials (objects, Selectors) keywords2.$(file.patterns.vb)=$(keywordclass.vbnet) $(keywordclass.vb6) $(keywordclass.vbotherstatements) keywords2.$(file.patterns.vb)=$(keywordclass.vbotherstatements) comment.block.vb='~ comment.block.vbscript='~ # VB styles # Default style.vb.32=$(font.base) # White space style.vb.0= # Comment style.vb.1=$(colour.code.comment.line),$(font.code.comment.line) # Number style.vb.2=$(colour.number) # Keyword style.vb.3=$(colour.keyword) # String style.vb.4=$(colour.string) # Preprocessor (directives) style.vb.5=$(colour.preproc) # Operator style.vb.6=$(colour.operator) # Identifier style.vb.7= # Date style.vb.8=$(colour.number) # End of line where string is not closed style.vb.9=$(style.stringeol) # Other keywords (bozo test colors :-) style.vb.10=$(style.vb.5),back:#D0FFD0 style.vb.11=$(style.vb.5),back:#D0D0FF style.vb.12=$(style.vb.5),back:#FFD0D0 # VBScript styles same as VB styles style.vbscript.0=$(style.vb.0) style.vbscript.1=$(style.vb.1) style.vbscript.2=$(style.vb.2) style.vbscript.3=$(style.vb.3) style.vbscript.4=$(style.vb.4) style.vbscript.5=$(style.vb.5) style.vbscript.6=$(style.vb.6) style.vbscript.7=$(style.vb.7) style.vbscript.8=$(style.vb.8) style.vbscript.9=$(style.vb.9) style.vbscript.10=$(style.vb.10) style.vbscript.11=$(style.vb.11) style.vbscript.12=$(style.vb.12) # wscript # normal execute command.go.$(file.patterns.wscript)="$(FilePath)" command.go.subsystem.$(file.patterns.wscript)=2 # note we have no real "build"; rather "execute and capture # compiletime and runtime errors" command.build.$(file.patterns.wscript)=cscript "$(FilePath)" command.build.subsystem.$(file.patterns.wscript)=1 command.help.$(file.patterns.wscript)=$(CurrentWord)!C:\Program Files\Microsoft Visual Studio\MSDN\2001OCT\1033\MSDN130.COL command.help.subsystem.$(file.patterns.wscript)=4 command.help.$(file.patterns.vb)=$(CurrentWord)!C:\Program Files\Microsoft Visual Studio\MSDN\2001OCT\1033\MSDN130.COL command.help.subsystem.$(file.patterns.vb)=4