Possible Duplicate:
Shortcut or button for copying posted code from Stack Overflow

What if we have a copy button near code area, so that single click will copy everything into clipboard?

The code area is sometimes too long and I need to scroll down, that's really wasting time.


Every OS has a pretty easy copy-paste shortcut concept. I don't think this will imporove the site significantly.

  • 1
    Yeah but selecting can be a pain in bottom when the code block is small and your screen is small. – hippietrail Aug 12 '12 at 18:06

In addition to what the other questions posted (copy-and-paste is sufficiently easy already), I'd argue that straight copying of the code from an answer is not usually the best course of action (even on high-quality answers).

You should read and understand the answer, using the code provided as a help to that. Even if the answer is exactly what you're looking for, chances are it will need to be adopted to your concrete project anyway. And in all this, the 1 second you take to select-and-copy will certainly not be the constraining factor.

  • 3
    The purpose (for me at least) is not to copy code from answers to use it; it's to copy code from questions to try it out so I can answer the question. – Keith Thompson Aug 10 '12 at 8:22
  • Ok, that makes more sense. I hadn't thought of that. – Joachim Sauer Aug 10 '12 at 8:26
Select text and Right click. Your browser will copy it for you. 

Every browser have copy paste option. So there is no need to have additional development efforts to have copy buttons.

Not the answer you're looking for? Browse other questions tagged .