How to copy and paste code with retaining the format

Posted by Sab on Super User See other posts from Super User or by Sab
Published on 2012-06-30T12:52:08Z Indexed on 2012/06/30 15:18 UTC
Read the original article Hit count: 167

Filed under:

This question may have been asked before but I was unable to find any solution. So here goes: When I browse and see some code that I would like to copy I simply use ctrl+c and ctrl+v. Most of the time this works fine. But in some cases (websites like stackoverflow and others ) when I copy the code and paste it , it only comes on one line in eclipse. I have tried pasting this code into eclipse and select all and hitting auto format but this doesnt help either. I have also pasted the code into komodo and word. But to no avail. The code simply refuses to align itself. Does anyone know any solution to this?

© Super User or respective owner

Related posts about copy-paste