How to copy code from the forums?

Hi, I’m wondering how to copy code from these forums with it keeping the formatting from forums to MonoDevelop, It is so annoying I’m just trying to copy some code from the scripting section and it become 1400 because of like all these blank lines between, How can I fix this? I don’t want to go by hand deleting them all.

I’ve tried on Chrome were this problem happens and IE explorer were it copies the line numbers as well.

Odd, I use Visual Studio, it auto reformats when I paste anything so I never see this problem.

Yeah, it’s a pain in the arse.

I’m guessing it’s doing something funny with line endings that the forum code formatting doesn’t like.

Doesn’t MD have an auto format option?

Actually, why bother looking, if you’re on a PC, just use VS. If you’re on a Mac, install a VM then use VS:

http://weblogs.asp.net/latishsehgal/archive/2009/08/15/working-with-visual-studio-on-a-mac.aspx

Honestly, I don’t know how people use MD, it’s so slow, find all references takes like several minutes !?!?!?!?!

Don’t I need to pay for visual studio? And really I have had no issue with MD except for this.

MD does have what I think is a formatting tool, but it seems not to work (Edit > Format > Format document) It is so annoying, realistically most people who would do a copy pasta from the forums would be using MonoDevelop so why not make it work with it!!!

It is annoying really, but MD’s auto format ( as mentioned by TylerPerry, Edit → Format → Format Document or Format Selection ) does what it says. Besides, if you don’t like MD’s default auto formatting settings you can change them to you like from Tools → Options → Source Code → Code Formatting = C# source code and then clicking Edit button. There is plenty of options in there.

Still, those blank lines from copy&paste are annoying…

You don’t have to pay for Visual Studio.
Just download Visual Studio Express. It’s free.