Delimiter, Brace and Brackets... SyntaxHighlighter

News

Extraordinary Robot
Robot
Today's Visual Studio Extension from Stefan Tashev is one of those nice to haves, one of a kind that you get very used to and come to rely on. With Visual Studio 2015 and the .NET Compiler Platform (fka Roslyn), building an extension like this should become very much easier, but today it's something of a chore...

Abmes SyntaxHighlighter


This is a Visual Studio extension which adds the following classification types:
- C#/JS/TS Delimiter - matches ':', ';' and ','
- C#/JS/TS Parenthesis - matches '(' and ')'
- C#/JS/TS Bracket - matches '[' and ']'
- C#/JS/TS Brace - matches '{' and '}'
- C# Namespace - matches a C# namespace

The above classification types can then be colored by going to Tools -> Options -> Fonts and Colors

Recommended Colors
- Operator = Red
- String = Green
- String (C# @ Verbatim) = Green
- Comment = Gray
- XML Doc Comment = Silver
- Number = Navy
- Preprocessor Keyword = Olive
- C#/JS/TS Brace (Abmes) = Blue
- C#/JS/TS Bracket (Abmes) = Red
- C#/JS/TS Parentheses (Abmes) = Red
- C#/JS/TS Delimiter (Abmes) = Red
- C# Namespace (Abmes) = R: 120, G: 10, B: 170

Here's the extension in action (using the extension's own source of course... :)



I've applied extreme colors to help make them stand out...



The source is obviously available...

abmes/SyntaxHighlighter

Installation


You can get the latest release from the Visual Studio Gallery. Go to Tools -> Extensions and Updates -> Online -> Visual Studio Gallery and search for Abmes SyntaxHighlighter

Compatible Visual Studio Versions


Currently this extension has been tested on:

  • Visual Studio 2012
  • Visual Studio 2013

Here's a snap of the Solution;



What I found interesting was the setup/config work required to make this all work. There's a great deal of lessons to learn here if you are thinking about creating a like extension...

Follow @CH9
Follow @coding4fun
Follow @gduncan411

njs.gif


Continue reading...
 
Back
Top