My Technical Notes

Saturday, 24 December 2016

Syntax Highlighting in Anki the Easy Way

Install the Power Format Pack extension.

Enable Markdown support by going into "Tools" → "Power Format Pack options" → "Button options" and on the "Markdown" tab, check the "Enable Markdown" checkbox and hit ok.

To add a card with syntax, you add the following sort of code:

def print_me(this):
    print "Printing: ", this

I have tried different languages that I usually use, and I have seen that `xml`, `html`, `js`, `csharp`, `fsharp` all work.

No comments: