This project is read-only.

Config.xml - Syntax Highlighting - HOW??!

Topics: User Forum
Mar 18, 2012 at 9:26 AM

Hi, I love ScintillaNET!

But unfortunately I cannot understand how to incorporate syntax highlighting. I am trying to get it to highlight VB.NET code:


<Language Name="vb">
		<AutoComplete FillUpCharacters=".([" SingleLineAccept="True" IsCaseSensitive="False">
				#Else #ExternalSource #Const #If #Region Action Action(Of ActivateMdiChild ActivationContext AddHandler AddOwnedForm 
AddHandler AddressOf Alias And 
AndAlso  Ansi As Assembly 
Auto Boolean ByRef Byte 
ByVal Call Case Catch 
CBool CByte CChar CDate 
CDec CDbl Char CInt 
Class CLng CObj Const 
CShort CSng CStr CType 
Date Decimal Declare Default 
Delegate Dim DirectCast Do 
Double Each Else ElseIf 
End Enum Erase Error 
Event Exit False Finally 
For Friend Function Get 
GetType GoSub GoTo Handles 
If Implements Imports In 
Inherits Integer Interface Is 
Let Lib Like Long 
Loop Me Mod Module 
MustInherit MustOverride MyBase MyClass 
Namespace New Next Not 
Nothing NotInheritable NotOverridable Object 
On Option Optional Or 
OrElse Overloads Overridable Overrides 
ParamArray Preserve Private Property 
Protected Public RaiseEvent ReadOnly 
ReDim REM RemoveHandler Resume 
Return Select Set Shadows 
Shared Short Single Static 
Step Stop String Structure 
Sub SyncLock Then Throw 
To True Try TypeOf 
Unicode Until Variant When 
While With WithEvents WriteOnly Xor

		<Indentation TabWidth="4" />

		<Lexer LineCommentPrefix="'">
			<Keywords List="0" Inherit="False">
				addhandler addressof andalso alias and ansi as assembly attribute auto begin boolean byref byte byval call case catch
				cbool cbyte cchar cdate cdec cdbl char cint class clng cobj compare const continue cshort csng cstr ctype currency date
				decimal declare default delegate dim do double each else elseif end enum erase error event exit explicit false finally
				for friend function get gettype global gosub goto handles if implement implements imports in inherits integer interface
				is let lib like load long loop lset me mid mod module mustinherit mustoverride mybase myclass namespace new next not
				nothing notinheritable notoverridable object on option optional or orelse overloads overridable overrides paramarray
				preserve private property protected public raiseevent readonly redim rem removehandler rset resume return select set
				shadows shared short single static step stop string structure sub synclock then throw to true try type typeof unload
				unicode until variant wend when while with withevents writeonly xor


However, I do not understand how it tells what words to highlight, and with what color??



Mar 19, 2012 at 1:33 AM

scintilla.ConfigurationManager.Language = "vbscript";
Mar 20, 2012 at 5:21 AM

no, i understand that part, It highlights fine, but I want to know how i can configure the highlighting in the Config.xml, as i cannot see an obvious way to do it.


Mar 20, 2012 at 6:03 AM

It's inheriting the color config from default.xml. I assume you are supplying your own config file as described in

Add the <Styles> element and override the styles you want. The style names for VB are listed here