colour coded formatting of code included in posts

colour coded formatting of code included in posts

Old forum URL: forums.lhotka.net/forums/t/11655.aspx


griff posted on Tuesday, October 23, 2012

Hi

I've noticed some posts have nice neat colour coded sample code e.g. see...

Need refresher... Rule Across Multiple Properties (jonnybees).

When I include sample code is does not format very well and the type face is not so readable so being able to have have 'pretty format' would be a benefit to all I believe.

Can those who embed the nice neat code enlighten me/us as to what they use - thanks.


JonnyBee replied on Tuesday, October 23, 2012

Hi,

I use the "Copy Source as HTML" plugin for Visual Studio.

Copy Source As Html-Visual Studio 11

http://blogs.microsoft.co.il/blogs/shair/archive/2012/04/10/copy-source-as-html-visual-studio-11.aspx

Thanks to Shai Raiten for making this available for VS 2012. 

"In Visual Studio 2010 Microsoft released the Productivity Tools that has the Copy Source Code as Html built in, also there is a CodePlex project - http://copysourceashtml.codeplex.com/ that supports Visual Studio 2005 and 2008.

Because Productivity Tools for Visual Studio 11 Beta isn’t out yet I’ve modified the CopySourceAsHtml project to Visual Studio 11 Beta + Some code changes (Bad performance loading visual studio)."

We will have to wait and see when MS will release this as a productivity tool for VS 2012.

griff replied on Tuesday, October 23, 2012

many thanks..or rather....

private bool ItWorks()

         {
             // Very good 
             var  message = "Thanks for that" ;
             SayThankYou(message);
 
         }
 

Copyright (c) Marimer LLC