ToolJovia
Developer

VS Code Snippet File Builder

Build an actual .code-snippets configuration from literal text, explicit placeholders, choices and linked tabstops.

✓ Browser-local processing

Loading tool…

How to use VS Code Snippet File Builder

Build an actual .code-snippets configuration from literal text, explicit placeholders, choices and linked tabstops. Turn repeated authored source into a reusable editor snippet file without hand-escaping dollar signs or JSON strings. Review the literal initial expansion, mirror definitions and cursor traversal before importing the separate file into your editor. No supplied program or regular expression is run here.

  1. Provide optional authored json model, typed snippet collection json.
  2. Choose the supported mode and run the tool. Review its assumptions and any reported errors.
  3. Copy the result or download a separate output; reset to clear the current form.

Good to know

  • One strict UTF-8 JSON model up to 50,000 bytes, 10,000 values and 40 levels. A file takes precedence over paste; duplicate/unsafe members and unknown keys refuse. Numeric controls must use exact plain integer JSON tokens, with no exponent, fractional or lossy near-integer spellings.
  • Root snippets contains 1–30 objects with name, prefixes and segments; description, languages and isFileTemplate are optional. Names are exact unique single-line strings up to 160 UTF-8 bytes. Each snippet has 1–10 unique literal prefixes up to 100 bytes, optional 1–20 unique selected ASCII language IDs, a description up to 500 bytes and an actual boolean isFileTemplate. No language registry is queried.
  • A body has 1–500 segments, at most 1,000 aggregate segments and 10,000 emitted UTF-8 body bytes per snippet. Text segments use {kind:"text",text}. A stop declares {kind:"stop",number}; placeholder adds a literal text default; choice adds 2–20 unique single-line literal choices up to 1,000 bytes each. This typed authoring model is not a general snippet parser.
  • Stop numbers are exact 0–99. Declare each nonzero number once, then use {kind:"mirror",number} only after that declaration. Zero is one optional final stop, without choices/defaults/mirrors. Traversal is ascending nonzero number followed by zero. Literal/default dollar signs, closing braces and backslashes, and choice comma/pipe/backslash characters receive the selected grammar escaping.
  • Generated output supports prefix/body/description/scope/isFileTemplate. Variables, nested placeholders, regular-expression or placeholder transforms, include/exclude file patterns, selection/environment access and execution are not supported. The literal preview uses each default or first choice, not editor indentation, actual editing or contextual insertion behavior.
  • Download original.code-snippets as real JSON bytes, or an evidence JSON report with exact generated body, literal preview, definitions and mirrors. The configuration download uses octet-stream so a browser preserves its special extension. Output is at most 200,000 UTF-8 bytes. Code and private text remain in the file/report; no automatic storage or upload occurs.
  • You must explicitly import/install the file into your own VS Code configuration and verify actual insertion behavior there. This tool does not control an editor, install an extension, execute a command or certify full TextMate/VS Code compatibility.
  • Structured text output is limited to 500,000 characters. Reduce the supplied source when that separate output budget is exceeded.
  • Inputs are processed on this device and are not automatically saved or uploaded.

Common questions

Will dollar signs in my original program become editor variables?

Plain text segments are escaped for literal insertion, so a dollar sign remains authored text. Only explicit typed stop, placeholder, choice and mirror segments create the selected snippet syntax. Variables and regex transforms are deliberately unavailable.

Does this change my original input?

No. The tool returns a separate result. Review that output before using it in another application.

Keep going with related tools

All developer →