Copy with style


#1

Request a feature to copy with style just like SubEthaEditor.
It will very useful when creating slides.


#2

Yeah I’d really appreciate this. Right now I have to open my source code files in TextMate to copy them into presentations.


#3

I created copy-with-style for this purpose. It supports several presets, if you copy to more than one destination that has different requirements, and can copy as both HTML and RTF. It reads the internal Atom DOM to get the colors, so what you copy will actually match what you see in the editor, and it has support for piping the result to an external script or tool instead of directly to the clipboard.

That last point is needed when copying to, for example, Google docs on OS X. Google docs support copy and paste of HTML markup with preserved formatting, but it requires the clip in the clipboard to be tagged as HTML, which it isn’t by default. I shared the one liner ruby script I used to achieve this on OS X in the package’s wiki on Github and encourage you to do the same if you write, or put together, a script or workflow for pasting with format into some other program on some other platform.