Twine 2 Sugarcube 2 Notepad++ UDL v1.01

This is an update to my Notepad++ User Defined Language file for Twine 2 Sugarcube 2. It now comes in light and dark versions:

Light version: https://mega.nz/file/3ltgXSQb#HAZd5w1uIhrKvK4UqdAKx3Rmms45dHM2y6vx8zdIb7E

Dark version:
https://mega.nz/file/79sSRbwQ#ll-BKo9LX65BCudWBqYhg8MmlP8v2Jx-pN0i-ryKOxE

You can download both files from this GitHub repository: https://github.com/varlance/npp-twine2-udl

Changelog

  • Numbers are now bolded.
  • <br> added as an operator.
  • Dark mode version of file added.

This is v1.01 of each file, which are provided as is. Please feel free to modify these files and distribute them or your own modified versions. You do not need to attribute them or seek my permission.

If you need to download Notepad++ the link is here.

How to use

To install a user defined language in Notepad++, simply copy and paste the relevant file into your Notepad++ user defined languages folder. On my system, it is in the following location:

C:\Users\<user>\AppData\Roaming\Notepad++\userDefineLangs

Refer to the Notepad++ documentation on UDLs if you’re not sure where to find this folder.

You do not need to rename the file. Once the file has been pasted into the UDL folder, simply close and reopen Notepad++. You should now see the option to select the language e.g. ‘Twine 2 Sugarcube 2 light (Varlance) v1.01’ from the Language menu in Notepad++.

Once selected, the language applies to the currently open file in Notepad++ and you will see your Sugarcube 2 code highlighted.

(To switch Notepad++ from light to dark, you can go to Settings > Style Configurator and change the theme from the default to “Deep Black”.)

The UDL was originally created on 2018-12-04 by going through the Sugarcube 2 documentation and identifying all the macros and special keywords. The colour scheme was based on the JavaScript colour scheme that comes with Notepad++ (since Sugarcube 2 is largely based on JavaScript). Sugarcube 2 has been updating regularly since I created the first version, so not all keywords will be defined in the UDL. Feel free to modify it to add any that are missing.

Similar resources

You can try out John Ayliff’s version using these links: