If you need to post a blog article containing code, and you happen to be using Visual Studio 2010 (VS), there’s a nice tool that provides an easy way to preserve it’s formatting and syntax coloration as it appears within VS.
[EDIT: The original LiveWriter plugin is no longer there — but Tim Mathias created a Visual Studio extension that accomplishes this (thank you Tim!). You can find it here ]
Download this extension using the button on the webpage. Launch the .msi file to install it. Now from within VS you just select your code, CTRL+C to copy it to the clipboard, and then go over to your Live Writer blog and in your main menu-bar, select Insert > Paste As VS Code… and ahhhh… check it! You also get a nice panel of options to set, and you can save your custimizations as a default.
- namespace RLib
- {
- /// <summary>
- /// Providing this interface helps contribute a sort of ‘aspect-oriented programming’ structure
- /// by interjecting an Interlocution and other subsystems across the board.
- /// </summary>
- public interface IApp
- {
- /// <summary>
- /// Provide access to the Interlocution class that provides us with the various notification and logging services.
- /// </summary>
- IInterlocution Interlocution { get; }
Very nice Tim!
by james w. hurst
Your Windows Live gallery – Paste As Visual Studio Code Link is dead.
Thanks for alerting me to that ElMatador! It’s corrected now. Evidently the Windows Live Writer Gallery was taken down, then moved.