C# is showing same color for class types and variable name. To my eyes it looks like modifier keywords (static) are same color as function parameters (args). These aren’t show stoppers. Having code in it’s own section with different back ground and most importantly using fixed width font are the big items for me.
Is there a way to tell it what the language is, like notepad++, or is it automatic?
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
using System.Diagnostics;
using EPDM.Interop.epdm;
namespace PDM_fileLastActiveDateUpdater
//namespace PDM_fileMaint
{
/*Comments
*
*/
public class LastActiveUpdater
{
private static IEdmVault20 vault;
private static StreamWriter logStream;
private static DateTime newlastActiveDateDT;
public const string LAST_ACT_VAR_NAME = "LastActiveDate";
private const string DATE_TIME_FORMAT = @"yyyy-MM-dd HH:mm:ss";
public const string DATE_FORMAT = @"yyyy-MM-dd";
static int Main(string[] args)
{
//do stuff
}
}
}
Is it customizable by you or do you have to rely on a community plugin to support? If its anything like cerating a custom langauge on Notepad++, its a challenge to create.
My brief research shows that we would need a custom theme component, but a lot of the heavy lifting already exists for other languages and it may just be a matter of incorporating a proper syntax description file/library/database into it.
I assume this forum is for sharing code, and the users are doing the editing elsewhere. I realize this makes it easier to read, but like bnemec says, I wouldn’t put it high on the priority list.
It does automatically select the language, but you could also override it by adding the language behind the ``` java|c|csharp|python|vbnet|vbscript and more, as shown in the image below. highlight.js supportes 192 languages.
Currently this auto language detection does not know what to do with the VBA language and I noticed that it jumps allot between different languages.
@JimSculley What languages have you configured for highlighting?
I can find this list in the source code. Is this the same list? If so, and I am not sure, but I belive vba should be either vbscript or vbnet. Could you try this?
I’ve created a new theme component for highlighting VBA, so syntax highlighting for it should now work correctly. For example, VBA has a ‘DefBool’ keyword which VB.NET does not and VB.NET has ‘Of’, which VBA does not. Both are handled correctly by the auto language detect:
A VBA sample:
Sub Main()
DefBool abc
DefBool xyz
End Sub
A VB.NET sample:
IPublic Class classHolder(Of t)
Public Sub processNewItem(ByVal newItem As t)
Dim tempItem As t
Dim DefBool as String
End Sub
End Class