Why isn't there a copy code option in the code samples block?
I would like to see a copy link over the code block (in posted questions) that helps us to copy the code to the clipboard and paste it directly to the IDE.
Posting entire programs on SO is discouraged. Unless the program is extremely small/simple, putting the whole thing up takes up a lot of space and makes it hard for other users to track down where the issues actually are. Anecdotally, large code posts tend to indicate a lack of effort or outright apathy on the part of the OP.
Without whole programs/large batches of code being posted, I don't see much value in a "copy code" button. You wouldn't be able to run anything, anyways. In the rare case where you want to, say, check the syntax of a short snippet, and the SO code highlighter isn't doing a good enough job, you can still manually copy/paste into your IDE fairly easily.
syntaxhighlighter.js v2
, then there's no easy way to select the original code without selecting all the extra markup that comes with it.