Sometimes I want to copy a random block of my code that uses 3rd party libraries and share it with others. e.g., Put it on a blog or something. If I paste what I copy, a lot of context is lost because you can't see the packages of the 3rd party libraries.
The solution I use is to reduce this code into a small class and then share the whole class, import statements and all. This is a lot of manual work, especially if it's just for a simple email to someone. Is there a way I can copy a snippet of code and have it include the full package paths?
You probably can use Scratch File (Ctrl-Alt-Shift-Insert) and copy-paste to it so imports should be copied too. It's a bit faster than copy-paste to new file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With