Syntax highlighting for Twee stories

A while ago I was working on a Twine story in Kakoune (using the third-party Tweego compiler) and whenever the creative side of my brain was drained I exercised the logical side by tinkering with a Kakoune syntax highlighter. Since it was already written and just sitting in my config repo, I figured I’d bust it out as a separate thing in case it was helpful to anybody else.

I don’t intend to do feature work on this plugin in the foreseeable future, but I’m more than happy to hear about bugfixes and merge other people’s improvements.

1 Like

What does your generated story look like?

The look and feel of a Twine story is determined by the “story engine” that interprets the markup and metadata written in the Twee file; Twine (and Tweego) include a couple of story engines by default, but I used the Harlowe engine which is the default for new stories.

Harlowe does provide some capability for custom CSS and JavaScript, but I didn’t use any of that, so the story I wrote just has the standard, default Harlowe look-and-feel.