How to enable C# Syntax Highlighting in Textpad

Sure, the C# page on Texpad’s site shows you how to enable syntax highlighting by downloading the syntax definition files for C#, but even this isn’t necessary. Here is how you enable it for C# without downloading additional syntax files.

Open Textpad and click Configure > New Document Class.

The Document Class Wizard will be displayed. In the document class name box, type a name say, CSharp and click Next.

CSharp-Syntax-Highlighting-Texpad-new-document-class

In the class members box, type *.cs and click Next.

check the enable syntax highlighting box. From the syntax definition file dropdown, select java.syn and click Next.

CSharp-Syntax-Highlighting-Texpad-select-java

Now click Finish to create the new document class.

Open any of your .cs C# file(s) in textpad. If Microsoft has done as good a job on C# from Java as it did on SQL Server from Sybase -which I think it did – you should see all the C# keywords and syntax characters highlighted !

syntax-highlighted-in-textpad

You get the 2nd comment!

  1. Eliza says:

    Genius. Thanks for that, saved me loads of time.

Leave a Reply