Syntax highlighting and in-passage search

There are two things I wish Twine had: passage syntax highlighting (for Sugarcube specifically) and the ability to push ctrl-f and search within a passage or in the javascript area (the online version seems to allow this, but not the local version).

I’ve been using Twine for several years now, but it only just occurred to me that there’s probably a formal way to request features and that I should go see if these were requested, and to request them if they haven’t been already.

Maybe via repositories and things like that, not sure if those are meant for know-nothings like me to poke around in tho.

From what I understand, Twine itself would have to be modified to properly allow for passage syntax highlighting. Chris Klimas, the author of Twine himself, opened an issue regarding this in 2014, and still hasn’t done it. TheMadExile, author of SugarCube, discusses the relationship between Twine, SugarCube, Harlowe, and syntax highlighting, in this Reddit post: “Passage editor color?

As for finding text within a passage, I’ll just straight up say that the text editor in Twine v2.x is currently, and has always been, pretty bad. For anything complex I just cut the text out of Twine, paste it into Notepad++ (or VSCode for JavaScript or CSS stuff), edit it, and then paste it back into Twine.

I don’t see a request specifically for searching/replacing text within the passage you’re currently editing, so if you wanted to make such a request, you could do that at the Twine Issues page at GitHub. And anyone wanting to request a new feature or to report a bug or problem should definitely sign up at GitHub so you can report those kinds of issues with Twine there.

Hope that helps! :slight_smile:

1 Like

That’s why I lurrrve AXMA - it highlights syntax and has find and replace within passages. There’s also a handy keyboard command that automatically toggles the paragraph around the cursor or a highlighted section as “commented out” and normal again - great for disabling specific sections of text to hunt down where a complicated if/else stack fails. You can select all > CTRL-K and the whole passage is commented and you can selectively turn things on and off and test that specific passage to narrow down where the problem is.

1 Like

It does help, thanks HiEv.