I would be very grateful for any advice on how to paste code from Visual Studio into a WordPress post. I have never found a plug-in or cut-and-paste pipeline that worked well for me.
[Edit 25 Sept 08 - I still haven't found a plug-in that works for me. But thanks to Sujeeth I have discovered pastebin.com, which for now looks like it's what I will want to use.]
Possibly Related Articles (possibly not)
- WPF Developer Tools I Can’t Code Without
- Ireland’s Call – Source Code
- TechDays 2009: ‘Building REST-ful Services with WCF’ Follow-up
Posted Aug 4th, 2008
into Developer
with tags code, paste, pastebin.com, Visual Studio, Wordpress
6 Comments »

Hey Man, not sure if you have already “googled” it, but someone asked me this before, I have not used wordpress, gonna move to it soon so I was looking at stuff like this and I found this
http://fluxcapacity.net/2007/07/22/one-solution-to-wordpress-code-snippet-formatting-problems/
A friend said that one or more of these solutions worked well.
Also if you need quick text macros and ways of changing space and tab characters , I use Notepad++, nice ways way of getting stuff done.
Cheers Rob, I think I may need to try that.
I tried CopySourceAsHtml for http://robburke.net/2008/08/05/more-of-silverlight-sound-implementation-for-multimedia-app/
it’s found here http://blogs.microsoft.co.il/blogs/bursteg/archive/2007/11/21/copy-source-as-html-copysourceashtml-for-visual-studio-2008-rtm.aspx
Sadly I lost my indentation again. Very frustrating.
Hmmm, might be the perpetual battle between tab and the 4 spaces thing, is there a way of replacing all tabs with non breaking spaces ?
I am prob preaching to the master here, but I intend to do the same thing soon and I am intersted in the outcome of this.
The code looks ok in the other 2 posts, but yea, the indentation thing is a bit of a downer.
You can use pastebin.com to paste your code as it displays in Visual Studio.
See my post http://technobuff.wordpress.com/2008/03/25/moss-2007-maintenance-and-trace-logs-removal/
Sujeeth – I would have thought some Visual Studio add-in would work best – but that is the best solution I’ve found so far. Thank you very much for introducing me to pastebin.com!
[...] to this posting, I discovered pastebin.com. It does a nice job of converting source code into html. And it has [...]