Sunday, May 03, 2009

Posting code

If you see my previous post you will see that my code is nicely decorated with colors and helpful utilities - copy to clipboard, etc. and it does not have any line spacing issues - things that I have been struggling for a long time now...

Last weekend I finally did a lot of RnD and came across http://alexgorbatchev.com/wiki/SyntaxHighlighter This guy has a bunch of styles and scripts which you have to include in you blogger template and done. Next time you need to post some code just wrap you code in <pre class="brush:c#"> and you are done.

This is awesome, but 1 issue with this is that, it does not recognize custom classes, and you cannot modify the scripts to include all the custom classes you would ever need – for this I liked “Paste from VisualStudio” plug-in for Windows Live Writer. It will give me the exact colors Visual Studio uses.

Only if we could combine the 2 :)

No comments: