15

When you hover over code on a question or answer, it would be nice to in addition to the syntax highlighting to maybe show a link in the top right corner or something you can click on that will open a small window with just that code in it so you can copy and paste the code very easily. Or else a link/button to copy the contents to a clipboard, I believe this can be accomplished with Flash. I have seen these features on most blogs and sites that have syntax highlighting.

2
  • this would be nice, especially since, at least from my experience, if you highlight and copy code it all gets put on one line. Commented Oct 6, 2011 at 21:11
  • +1: This would be really useful. It is troublesome trying to copy stuff when trying to troubleshoot/try code in a question. Anything that reduces the boring bits of answering a problem is great Commented Dec 12, 2012 at 19:11

3 Answers 3

1

They could add a colored line, like they do in SuperUser quotes, that could be clicked on to copy.

1

Sounds like the perfect application for greasemonkey...

1

Syntax highlighter does it but it has quite a big overhead when loading. The google alternative is a lot faster but has no new window feature.

SO already has syntax highlighting though so just a new window icon would be useful, and fairly easy to add.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.