Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>SpintaxNew to Visual Studio Code? Get it now.
Spintax

Spintax

301.st

| (0) | Free
Syntax highlighting for spintax templates — {a|b|c}, [<config>a|b], %vars%, #set/#include, {?VAR?…} conditionals, and {plural N: …} plurals.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Spintax for VS Code

Version Installs CI License: MIT

Syntax highlighting for spintax templates in Visual Studio Code — engine-accurate against the @spintax/core contract and verified headlessly with vscode-tmgrammar-test. Applies to .spintax and .gtw files.

Construct Example
Enumeration {a\|b\|c}
Permutation [<minsize=2;maxsize=3;sep=", ">a\|b\|c]
Variable %name%
Local set #set %name% = value
Include #include "slug-or-id"
Conditional {?VAR?then\|else} · {?!VAR?…}
Plural {plural %n%: one\|few\|many}
Comment /# … #/

Example

/# hero block #/
#set %product% = Acme
{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

  • Marketplace: open the Extensions view (Ctrl/Cmd+Shift+X), search Spintax, and install — or run code --install-extension 301st.spintax.
  • From VSIX: download the .vsix from the latest release and run Extensions: Install from VSIX….

Features

  • Full, engine-accurate tokenization of every spintax construct, including nested spintax inside conditional branches and enumerations.
  • Correct permutation config: <minsize=…;sep=…> is config, while HTML inside items ([<li>a</li>|b], [<a href="/x">…</a>|b]) is content — not mis-highlighted as config. Genuine separators ([<and>a|b], [a<, >|b]) are highlighted.
  • Strict conditional / plural openers — {??x} and {plural noun} are not mis-highlighted.
  • Block-comment toggle (/# … #/) and auto-closing of {}, [], %%, "".

Development

The grammar is verified with headless vscode-tmgrammar-test:

npm install
npm test

Grammar lives in syntaxes/spintax.tmLanguage.json; scope assertions in tests/. It mirrors the Sublime Text package (investblog/sublime-spintax).

Related

  • 📖 Syntax reference — https://spintax.net/docs/syntax
  • 🧪 Live playground — https://spintax.net/play/
  • 📦 Engine (@spintax/core) — https://www.npmjs.com/package/@spintax/core

License

MIT — part of the 301.st toolset.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft