The Qodesmith 15 Posted July 22, 2015 Share Posted July 22, 2015 Hello All! While I know Evernote isn't tailored for coders, I've tried to set up my EN styling to help. For instance, I use a mono-space font as default this way when I paste in code, things will look readable (or familiar, at least). I use Sublime as my editor of choice, like many other programmers, and Sublime will colorize your code as you type to help visualize what's going on. While I don't expect EN to do something like this, I was wondering if there was a script or some add-on that could accomplish this. Here would be the workflow: Paste code into a new note Select the code (or portion of text) you'd like to colorize Run script or add-on The selected code is now colorized as in Sublime and other text editors Does something like this exist? Is it possible to create this in the EN universe? Not really sure of what can and can't be done here in EN land, but I'd sure like to find out! I've attached a screenshot of the colorization in Sublime for a visual reference. Thanks for any tips and constructive comments! Link to comment
The Qodesmith 15 Posted July 22, 2015 Author Share Posted July 22, 2015 Totally answered my own question. This may be for Sublime specific users, but there is a downloadable package called SublimeHighlight. Once in Sublime, it allows you to copy text as RTF which can then be successfully pasted into EN with all the syntax highlighting. Awesomeness! Link to comment
bootislands 6 Posted February 19, 2016 Share Posted February 19, 2016 In fact, ultraEdit and Notepad++ also support copy as RTF, which is a very good solution for code highlight. but the core problem is, evernote will add extra spaces in paste result, which makes none of these solution works good enough. check: and Link to comment
Level 5* DTLow 5,721 Posted February 19, 2016 Level 5* Share Posted February 19, 2016 19 minutes ago, bootislands said: the core problem is, evernote will add extra spaces in paste result, which makes none of these solution works good enough. I don't use Evernote as a code repository; but I do store snippets of code for reference. Below is a sample of a note with applescript code I've saved from the Script Editor app. Yes, it may not have the exact spacing as in the editor, and possibly I should change the font. This seems adequate for my needs. I tried the new code block feature but I lost all the formatting. What am I missing? Link to comment
bootislands 6 Posted February 19, 2016 Share Posted February 19, 2016 @DTLow The behavior has trigger point. Your case seems adequate to me too, whereas check this JS code: If EN add spaces to make /./g become /. / g , it's totally different. Link to comment
Level 5* JMichaelTX 4,108 Posted February 19, 2016 Level 5* Share Posted February 19, 2016 8 hours ago, bootislands said: but the core problem is, evernote will add extra spaces in paste result, which makes none of these solution works good enough. So, since I can't trust Evernote to always paste my code *exactly* as I copied it, I can't use Evernote for storing code snippets. You gave one JavaScript example, but who knows how many other cases also cause the insertion of spaces or other changes. Evernote has recently added a "Code Block" feature in EN Mac 6.5 Beta 3 Release Candidate , and I would guess it will make its way into the EN Win app as well. But until it is working perfectly in a public, general release, I will continue to store my code snippets elsewhere. I am using Quiver The Programmer's Notebook , and it works very well. Unfortunately, it is available only for the Mac. EDIT: Fri, Feb 19, 2016 at 5:18 PM CST Evernote has just posted: Evernote for Mac 6.5 Released Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.