/ xojo

Xojo Prism Language Definition

I seem to be on a bit of a roll vis-a-vis Xojo syntax highlighting. I’d like to announce the release of a language definition for Xojo for the Prism syntax highlighting engine.

Why have I written another language file for Xojo? Well, I’ve been writing a lot in Markdown and have recently started using the fabulous (and free) Macdown app to do so. The only shortcoming I found with it was that, whilst able to highlight code from a number of programming languages, it couldn’t highlight Xojo code. Given the highlighting engine of Macdown is powered by Prism, I figured I’d have a go at writing a definition file for it.

How do I use it with Macdown?

You’ll need to place the definition file Macdown’s application bundle. You can find this by right-clicking on the Macdown app in your Application folder and selecting Show Package Contents. Put the file in: Contents > Resources > Prism > components. You’ll need to restart Macdown if it’s open for the new language to be recognised.

To highlight Xojo code in a Xojo document, just wrap it in a code fence as below:

``` xojo

Dim s As String = “Hello World"



The language file is hosted over at GitHub. Feel free to modify / improve it as you see fit.