Page 1 of 1
copy with syntax highlighting
Posted: Thu Jun 20, 2013 8:01 pm
by oddsock
Is there a way I can copy my code with syntax highlight colors included?
I can get there via an intermediate html file (Edit->Copy Other->As a HTML Page), but would like to just copy/paste colored code snippets directly to my email (for example).
I think Notepad++ can do this via rtf, but I like TextPad.
Thanks!
Posted: Wed Jul 03, 2013 11:11 pm
by kengrubb
After doing a little searching, I was not able to find an easily scriptable solution to convert the HTML to RTF. If that is possible, and someone posts it here, I'll run with it and see what I can do.
In direct answer to your question, it does not appear possible from within TP.
You could make an enhancement request for a Copy Other>As RTF feature.
Posted: Thu Jul 18, 2013 11:01 pm
by jeffy
Consider Windows' Snipping Tool. Type "snippingtool" into the Run... box. You can take a screenshot of any portion of the screen you like. Save it to the desktop, then attach it to your email.
Posted: Thu Jul 18, 2013 11:03 pm
by jeffy
kengrubb wrote:You could make an enhancement request for a Copy Other>As RTF feature.
That's an interesting idea.
Posted: Mon Jul 28, 2014 7:01 pm
by jms
I wonder why this has not been implemented.
Since "copy as html" is already there, the only thing to be done is generating 5 lines of header and setting the clipboard format to Html:
Clipboard.SetText(HtmlText, TextDataFormat.Html);