Newer posts are loading.
You are at the newest post.
Click here to check if anything new just came in.

Did you know Evernote supports code blocks?

Me neither.

At the beginning of the year, I’ve started to use Bear to store my QQ notes—QQ notes are short answers for quick questions—mainly because Bear supports a Markdown-ish flavor of text which made it simple, visually pleasant and very legible, to store code snippets and even embedded images.

But the other day, while in Evernote, thanks to the power of habit, I typed ```—the Markdown fenced code separator1. What happened next took me completely by suprise: what seemed to look like a code snippet formatted section showed up.

Evernote code snippet

To make things more intriguing, I couldn’t see anything related to this behavior either in the formatting bar or under the Format menu. It took me a while to find an “Enable code block” setting on the Software Update tab in the Preferences.

Enable Code Blocks in Evernote

Once this feature is enable, the formatting bar in the editor will get a new button ({}) and you’ll find a Code Block format option in the Format -> Style menu with an assigned shortcut Ctrl-Cmd-B.

Now, don’t get your hopes too high. There is no syntax highlighting based on the language. And if you wish you’d get something like Pygments that’s probably never going to happen. But at least you don’t have to manually switch to a monospace font to indicate that a piece of text is a code snippet or code block.

So, yay Evernote!

  1. To be very accurate, fenced code is an extension of Markdown. In the original Markdown, code paragraphs were indeed supported, but they required using a tab indentation. 

No Soup for you

Don't be the product, buy the product!

YES, I want to SOUP ●UP for ...