Save notes to Evernote from Sublime Text

A Sublime to Evernote Package

For a few years now I’ve used Snippets for keeping track of code snippets. It’s been a fine app, but recently has become slow, looks funny on Yosemite, and I get the feeling it’s become vaporware.

Since I use Evernote for keeping track of lots of things, both business and personal, I thought I’d look into using it for code snips. It’s easy enough to create a Snippets notebook, and notes for each bit of code – but retaining syntax highlighting and formatting doesn’t seem possible in Evernote. The first bit of javascript I tried to add pasted in as one long line, unformatted and unreadable. Bummer.

Enter bordaigorl/sublime-evernote.

I use Sublime Text everyday, this little package allows saving, opening, and updating notes to and from Evernote right from Sublime. Thus far I’ve tried two snippets, a .js and a .php script. The php file came in okay – no syntax highlighting but the line breaks and tabs were intact. The .js file saved as it had before. No highlighting, no line breaks/tabs.

I’ll update this post as I figure out how to get the highlighting perfected. At the very least it’s nice to leave an outdated app behind.

Update: Okay that didn’t take long… the way to get syntax highlighting and formatting to work is to use Markdown… Here’s an example with the proper Markdown to get it working with javascript:

```javascript
$(document).ready(function() {
    $('.hover').bind('touchstart touchend', function(e) {
        e.preventDefault();
        $(this).toggleClass('hover_effect');
    });
});
```

And here’s a quick reference for Markdown if you need it: https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet

3 Comments


You do not need to use markdown, you can use the \”Clip as new note\” command, which was created specifically for this use-case!

Just write your snippet making sure the ST view is using the relevant syntax highlighting and then use the command.
You will be asked which notebook and which title/tags to use for the new note. If you then open the new note created like this you\’ll find it nicely formatted in markdown already.

For more info see the wiki:
https://github.com/bordaigorl/sublime-evernote/wiki/Available-Commands#clip-as-new-note

Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Tell us about your project.

We'd love to hear what you're working on.

Work with us

Hi. We are Spigot. Telemarketers pronounce it Spy-got.

We are a Park City, Utah based web design shop that excels at building custom websites powered by WordPress and WooCommerce. We love content - content strategy, content curation, content soup...????Have a look around the site. As you browse you'll find useful navigation links in the sidebar on the left. We hope you find them useful anyway... Please let us know what you think, shoot us a message here.