Gvim/Vi syntax highlighting for Twine + Sugarcube?

Twine Version: 2
Story Format: Sugarcube 2.3.1

Has anyone created a gvim syntax highlighting file for Twine/Sugarcube, or a similar environment that allows vi-style text editing? I’ve searched but can’t find one.

I am not looking for syntax highlighting in general. I specifically want syntax highlighting with gvim/vi-style editing.

I tried using VSCode with the Vim plug-in, but that plug-in has a known bug that causes input to become unusably lagged.

I’m willing to switch to another Windows-based development environment - it doesn’t have to be gvim specifically, as long as it supports vi-style input.

(and please, please don’t just tell me “use VSCode”. I’ve explained why VSCode isn’t a workable solution.)

Thank you!

1 Like

I believe the search term you want is “twee”, the name for the text-file-based syntax for Twine games.

As far as I know there’s only this one and maybe a couple variants of it. Fairly rudimentary, but it does the basics.

1 Like

I missed your explanation. What was the reason that VS Code wouldn’t work for you?

(I’m not trying to convince you to use it. Use whatever you want. I’m just curious.)

^-- that’s the reason

1 Like

Ohhh. Reading comprehension fail. Heh.

So you’re using an extension to make VS Code act like Vim? I guess it would be better to use Vim itself then, yeah.

vi and its descendants are God Tier fast for a touch typist who knows them well - you can do regex substitutions over a specified section of the file, set “bookmarks” and move between them, etc., without moving your fingers off the keyboard.

Some IDEs have a vi mode that gives you the advantages of both environments, and I was hoping VSCode would be one of them. It was a real disappointment to search for “vscode unusable latency” and out that the Vim plug-in has had this problem for years now.

I can’t exactly recommend learning vi if you already know another good editor - it doesn’t give you any advantage until you’ve put in some practice, so unless you’re maintaining a lot of Unix machines and need a powerful editor that’s already installed everywhere, there’s no particular reason to switch. But once you do know vi, you’ll want to take it everywhere you go.


Somebody also seems to have made an emacs mode for twee:

You can then use the built-in viper mode or install evil to emulate your satanic editor. :wink:

And the war rages on.

1 Like

Only in a limited sense, because generally the internal data model structure of a standard Text Editor / IDE is drastically different than the one used by VI.

And it is VI’s internal data model structure that allows it to do the amazing things it does. (the same goes for the internal data model used by Emac :slight_smile: )

1 Like

well, yes, for the immortal Grey Elves who pass their endless days in tranquil Laurelindórenan, where the manpages are written in Quenya and the whispering drives of the server farms lull you to sleep beneath the boughs of the malloc(3) trees, I do not doubt that there is ample time to contemplate the differences between vi and a vi emulator! but in the 8 eyes of this particular spider, this limited view has, for my purposes, sufficed