Package Control

The official Sublime Text package manager.

Spintax

Engine-accurate spintax syntax highlighting for Sublime Text — {a|b} enumerations, [a|b] permutations, %vars%, conditionals, plurals, #set/#def/#include, plus nesting shades for brace depth. Install via Package Control.

By investblog
Created July 8, 2026, last updated August 9, 2026.

JulJunMayAprMarFebJan Dec2025 NovOctSepAug 2026-W33 | installs: 0 | removals: 0 | upgrades: 0 2026-W33 | installs: 0 | removals: 0 | upgrades: 0 2026-W33 | installs: 0 | removals: 0 | upgrades: 0 2026-W32 | installs: 0 | removals: 0 | upgrades: 0 2026-W32 | installs: 0 | removals: 0 | upgrades: 0 2026-W32 | installs: 0 | removals: 0 | upgrades: 0 2026-W31 | installs: 0 | removals: 0 | upgrades: 0 2026-W31 | installs: 0 | removals: 0 | upgrades: 0 2026-W31 | installs: 0 | removals: 0 | upgrades: 0 2026-W30 | installs: 1 | removals: 0 | upgrades: 0 2026-W30 | installs: 1 | removals: 0 | upgrades: 0 2026-W30 | installs: 1 | removals: 0 | upgrades: 0 2026-W29 | installs: 0 | removals: 0 | upgrades: 0 2026-W29 | installs: 0 | removals: 0 | upgrades: 0 2026-W29 | installs: 0 | removals: 0 | upgrades: 0 024 WeeklyInstalls 024 WeeklyUpgrades 2026-W32 | upgrades: 0 1.3.1 / 1.3.0 2026-W30 | upgrades: 0 1.2.0 2026-W29 | upgrades: 0 1.1.1 / 1.1.0 2026-W28 1.0.0
Installations: recent average 0 per week, 1 in total
Installations minus removals
Upgrades

Links

Versions

1.3.1 (>ST3091) ·
2026-08-09 11:24

More

Spintax — Sublime Text syntax highlighting

CI License: MIT

Syntax highlighting for spintax templates in Sublime Text — engine-accurate against the Modern Spintax Engine (@spintax/core) contract. Applies to .spintax files.

Example

/# hero block #/
#set %product% = Acme
#def %tone% = {friendly|warm}
{Welcome to|Meet} %product% — %tagline%, trusted since {2019|2020}.
Ships with [<minsize=2;maxsize=3;sep=", ";lastsep=" and ">SSO|audit logs|alerts]{?free? — free tier available|}.
You have %n% {plural %n%: message|messages}.

Install

  1. Open the Command Palette → Package Control: Install Package.
  2. Search for Spintax and install.

Manual

Clone or download this repo into your Sublime Text Packages/ directory (Preferences → Browse Packages…) as a folder named Spintax.

What you get

Nesting shades (optional)

Braces and brackets carry a cycling .depth-1.depth-4 scope suffix (depth 5 wears depth-1 again), the way Spintax Studio shades nesting — so you can see which closing bracket belongs to which opening one without counting. Default colour schemes render all depths alike; to shade pairs by level, add rules to your scheme (Preferences → Customize Color Scheme):

{
  "rules": [
    { "scope": "punctuation.section.braces.begin.spintax.depth-1, punctuation.section.braces.end.spintax.depth-1, punctuation.section.brackets.begin.spintax.depth-1, punctuation.section.brackets.end.spintax.depth-1",
      "foreground": "#e5c07b" },
    { "scope": "punctuation.section.braces.begin.spintax.depth-2, punctuation.section.braces.end.spintax.depth-2, punctuation.section.brackets.begin.spintax.depth-2, punctuation.section.brackets.end.spintax.depth-2",
      "foreground": "#61afef" },
    { "scope": "punctuation.section.braces.begin.spintax.depth-3, punctuation.section.braces.end.spintax.depth-3, punctuation.section.brackets.begin.spintax.depth-3, punctuation.section.brackets.end.spintax.depth-3",
      "foreground": "#c678dd" },
    { "scope": "punctuation.section.braces.begin.spintax.depth-4, punctuation.section.braces.end.spintax.depth-4, punctuation.section.brackets.begin.spintax.depth-4, punctuation.section.brackets.end.spintax.depth-4",
      "foreground": "#56b6c2" }
  ]
}

Development

Tokenization is verified with Sublime Text's own syntax test runner. The assertions live in tests/syntax_test_spintax.spintax and cover every construct plus the tricky discriminators (permutation config vs. HTML, leading/trailing separators, strict conditional/plural openers). CI runs them against Sublime Text latest, stable, and an ST3 build via SublimeText/syntax-test-action.

Run them locally from Sublime Text with Build With: Syntax Tests (Ctrl/Cmd+B) while the test file is open.

Known limits and ideas — including what a plugin backed by the Python engine would add that a syntax definition cannot — live in docs/TODO.md.

Releases are published from tags: tag a commit X.Y.Z and push it, and the release workflow creates the GitHub Release using the matching ## X.Y.Z section of CHANGELOG.md as its notes — so that section has to exist first. Package Control installs from tags, so a tag is the release; the GitHub Release entry is the shop window.

The VS Code sibling additionally verifies the mirrored TextMate grammar headlessly (vscode-tmgrammar-test) under the real Oniguruma engine.

License

MIT — part of the 301.st toolset.

Results

Packages