It is possible. I haven't looked into how to get it formatted into the clipboard proper. Just copying the HTML is not the same. Thanks for the links. I will take a look at them when I get some time. Once i understand what needs to be done to get it properly in the clipboard, I can probably add the feature. Can't promise when I will get around to it, but I will take a look into it.

Yea, that's fine. I figured that calling "SetText" on a clipboard object does what you said just as if you were copying text from ST itself. Copying to clipboard would make it easier to paste the formatted text into emails or documents and give this fine text editor one more leg up on Visual Studio

I understand. Personally I would love to take out the step of opening the browser so I can copy the content and paste it in an email. Hopefully it will be pretty simple once I read up on it. It is just one of those things were the stop gap solution works and hasn't annoyed me enough yet to force me to fix it, yet it is still annoying enough that I keep thinking I will fix it down the road.

# Create the body of the message (a plain-text and an HTML version).text = "Hi!\nHow are you?\nHere is the link you wanted:\nhttp://www.python.org"html = """\<html> <head></head> <body> <p>Hi!<br> How are you?<br> Here is the <a href="http://www.python.org">link</a> you wanted. </p> </body></html>"""

# Create the body of the message (a plain-text and an HTML version).text = "Hi!\nHow are you?\nHere is the link you wanted:\nhttp://www.python.org"html = """\<html> <head></head> <body> <p>Hi!<br> How are you?<br> Here is the <a href="http://www.python.org">link</a> you wanted. </p> </body></html>"""

Yeah, I use smtplib at work to email myself stuff when certain events occur. If you use something like minirelay or hMailServer on windows, you can set up your own outgoing smtp service on that computer bypassing having to use an external smtp server.

On Mac, and I believe Linux, you can use mailx to send out mail. On mac it uses username@yourpc...something like that. I think in Linux you can actually specify the sender, so yeah sending mail is completely possible.

Simple example that works on Mac or windows (assuming you have a smtp relay setup on windows so you can use localhost as your outgoing smtp server; notice no authentication is needed unless you configure it that way). Keep in mind this is not very robust, only an example.

mailx was a little broken out of the box on Mountain Lion. To fix on Mountain Lion

As I have found here at my office, our proxy blocks outbound SMTP calls directly. I'd found a way to make calls to send mail through Exchange via a VB script, but that probably won't help much here.

My point about sending via email was just an example. There are plenty of times where I want to paste code snippets into Word documents SharePoint (yuck) pages, or even (more frequently for me) Evernote where I can save off commonly used snippets of code for searching later.

If we want to email our happily formatted code, is it possible to make a new plugin that piggy-backs off of this one?

Grant wrote:As I have found here at my office, our proxy blocks outbound SMTP calls directly. I'd found a way to make calls to send mail through Exchange via a VB script, but that probably won't help much here.

My point about sending via email was just an example. There are plenty of times where I want to paste code snippets into Word documents SharePoint (yuck) pages, or even (more frequently for me) Evernote where I can save off commonly used snippets of code for searching later.

If we want to email our happily formatted code, is it possible to make a new plugin that piggy-backs off of this one?

Don't worry, I have no intention of supporting email in this plugin. The code I posted was an example because agibsonw brought it up. I tried to get a script to send emails directly with outlook at work, but it is a pain. I was just showing a basic example I use at work to send emails to myself with some fake email. It works great to notify myself of events when I am away from my computer, but I do not want to write a plugin where I have to support X mail server and Y mail protocol because firewall Z blocks A etc. I just don't want to support stuff like that.

I will be happy if I can get the HTML formatted properly for clipboard with the major the major OS variants...assuming I can get that done .

Soz. I was just pleasantly surprised that the email code worked out of the box . But, on reflection, I realise that there is a lot more to this than meets the eye. Besides which, the html would need to be stripped of all JS, stylesheets, HTML headers etc.. [I presume this would be necessary for the clipboard as well.]

Andy.

"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.

-Theme json is now embedded in the HTML and can be reassembled into a PLIST XML via a function call and extracted. You can enable a setting to display a button to download the theme (chrome will actually download the theme; others will open a window with the plain text xml in it; a limitation in other browsers right now or in my knowledge).-I have added code to allow for toggling plain text mode of the exported html (it can only be accessed right now when it is embedded in another webpage, but I plan to expose this via a toolbar that will appear...I am not there yet).-I also added a feature a couple of weeks ago to save the XMLs in a folder of your choice or in the same folder as the original source. It also has an optional timestamp that is appended to the file that you can disable.