Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>Nifty Snippets: Snippets & File TemplatesNew to Visual Studio Code? Get it now.
Nifty Snippets: Snippets & File Templates

Nifty Snippets: Snippets & File Templates

Nifty

| (0) | Free
Snippets and file templates with live values: dates, UUIDs, file and folder names, git user and branch, prompts and pick lists, with case transforms like PascalCase and kebab-case.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Nifty Snippets

Snippets and file templates with live values: dates, UUIDs, file and folder names, git user and branch, prompts and pick lists, with case transforms like PascalCase and kebab-case.

Maintained. No sign-in. No telemetry. Works in VS Code, Cursor, Windsurf, VSCodium and other editors that use Open VSX.

Features

Typing a team snippet's prefix in a React file: completion shows what the snippet would insert, named after the file

New File from Template asks for the component name once

The template created ShoppingCart.tsx, its test and shopping-cart.module.css with the names filled in

  • Snippets that fill themselves in. Put {{…}} values in a snippet and they're worked out when you insert it:
    • dates and times: {{date}}, {{date:DD.MM.YYYY}}, {{time}}, {{iso}}, {{year}}
    • the file: {{file.name}}, {{file.base}}, {{file.ext}}, {{dir.name}}, {{relativePath}}, and {{namespace}} from its folders
    • you and your repo: {{git.user}}, {{git.email}}, {{git.branch}}, {{env:NAME}}
    • {{uuid}}, {{clipboard}}, {{selection}}
  • Ask as you insert. {{input:Component name}} asks for a value ({{input:Port=3000}} has a default), {{pick:Kind;class,interface,enum}} offers a list. Each prompt is asked once, however often it's used.
  • Case transforms turn any value into the shape you need: {{input:Name | pascal}}, | camel, | kebab, | snake, | constant, | title, | upper, | lower, | plural.
  • File templates. Right-click a folder, New File from Template…, answer the questions, and get every file of a feature at once, such as a component, its test and its stylesheet, with names and contents filled in.
  • Works like normal snippets. Type a snippet's prefix and it's in completion; VS Code's $1, ${1:default} and $0 tab stops still work. Or press Ctrl+Alt+J to pick one.
  • See what you'll get. The completion details show what the snippet would insert right there: the file name, date, git user and other values filled in, prompts with their default (or their name), and empty tab stops as ….
  • Share them. Keep snippets and templates in .vscode/nifty-snippets.json (with IntelliSense; comments and trailing commas are fine) so the whole team has them, or in your user settings.

Example .vscode/nifty-snippets.json

{
  "snippets": [
    { "name": "Header", "prefix": "hdr", "body": ["// {{file.base}}", "// {{git.user}}, {{date}}", "$0"] },
    { "name": "Component", "prefix": "rfc", "languages": ["typescriptreact"],
      "body": ["export function {{file.name | pascal}}() {", "  return <div className=\"{{file.name | kebab}}\">$0</div>;", "}"] }
  ],
  "templates": [
    { "name": "React component", "files": [
      { "path": "{{input:Name | pascal}}.tsx", "body": ["export function {{input:Name | pascal}}() {", "  return null;", "}", ""] },
      { "path": "{{input:Name | pascal}}.test.tsx", "body": ["import { {{input:Name | pascal}} } from './{{input:Name | pascal}}';", ""] },
      { "path": "{{input:Name | kebab}}.module.css", "body": [".root {}", ""] }
    ] }
  ]
}

Commands

Command What it does
Nifty Snippets: Insert Snippet… Pick a snippet (Ctrl+Alt+J)
Nifty Snippets: New File from Template… Create files from a template (Explorer right-click)
Nifty Snippets: Edit Snippets and Templates Open .vscode/nifty-snippets.json (created with examples)

Settings

Setting Default What it does
nifty.snippets.snippets [] Your own snippets
nifty.snippets.templates [] Your own file templates

Install

  • VS Code: search for "Nifty Snippets" in the Extensions view, or install from the Visual Studio Marketplace.
  • Cursor, Windsurf, VSCodium, Kiro, Antigravity: install from Open VSX.

Privacy

This extension collects no telemetry and needs no account.

More Nifty tools

  • Nifty Templates: Jinja, Twig & Nunjucks: Jinja, Twig and Nunjucks: highlighting in HTML, YAML and any file, block formatting, outline and folding, unclosed-tag errors, completion with docs, snippets, and go to definition for templates. (Open VSX)
  • Nifty C# Templates: New Class, Record & Namespace: New C# class, interface, record, enum, test and controller files with the right namespace, plus namespace syncing. (Open VSX)
  • Nifty Diagrams: PlantUML, Graphviz & D2 Preview: PlantUML, Graphviz (DOT) and D2 diagrams rendered on your machine: live preview beside the editor, SVG and PNG export, diagrams in the Markdown preview, errors in Problems. No server needed. (Open VSX)
  • Nifty Docstrings: Doc Comments for Python, PHP, Rust and Go: Type three quotes under a Python function and get a Google, NumPy or Sphinx docstring with its arguments, types, returns and raises. PHPDoc, Rust and Go doc comments too. (Open VSX)
  • Nifty Helm & Kustomize: Values IntelliSense: Helm .Values IntelliSense (completion, hover, go to definition, missing values) and Kustomize navigation, checks with quick fixes, an overlay tree, patch target hovers, build previews and diffs. (Open VSX)
  • Nifty Mermaid: Mermaid Diagram Preview & Export: Mermaid diagrams with no account: live preview beside .mmd files and Markdown, diagrams in the Markdown preview, syntax highlighting, and export to SVG or PNG. (Open VSX)

See all 100+ Nifty extensions and web tools at https://getnifty.dev

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft