Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Pattern ExpandNew to Visual Studio Code? Get it now.
Pattern Expand

Pattern Expand

alexjackson1

|
1 install
| (0) | Free
Create files and directories using brace expansion patterns
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Pattern Expand VS Code Extension

Create files and directories using brace expansion patterns.

Features

  • Brace lists: {a,b,c} → a, b, c
  • Numeric ranges: {1..5} → 1, 2, 3, 4, 5
  • Zero-padded ranges: {01..10} → 01, 02, ..., 10
  • Descending ranges: {5..1} → 5, 4, 3, 2, 1
  • Character ranges: {a..f} → a, b, c, d, e, f
  • Multiple groups (cartesian product): {a,b}-{1,2} → a-1, a-2, b-1, b-2
  • Nested groups: {a,{b,c}} → a, b, c

Usage

  1. Open Command Palette (Ctrl+Shift+P / Cmd+Shift+P)
  2. Run Pattern New File
  3. Enter a pattern like src/{components,utils}/{index,types}.ts
  4. Files and directories are created, and the first file opens in the editor

Build Instructions

# Install dependencies
npm install

# Compile TypeScript
npm run compile

Development

  1. Open this folder in VS Code
  2. Press F5 to launch the Extension Development Host
  3. In the new window, run the "Pattern New File" command

Watch Mode

npm run watch

This will recompile on file changes.

CI

This project includes a GitHub Actions workflow (.github/workflows/ci.yml) that runs on push and pull requests to main:

  • Installs dependencies
  • Compiles TypeScript
  • Runs linting

CI

Examples

Pattern Expanded Files
test.txt test.txt
{a,b}.txt a.txt, b.txt
src/{foo,bar}/index.ts src/foo/index.ts, src/bar/index.ts
file{1..3}.txt file1.txt, file2.txt, file3.txt
file{01..03}.txt file01.txt, file02.txt, file03.txt
{a..c}.txt a.txt, b.txt, c.txt
{x,y}/{1..2}.ts x/1.ts, x/2.ts, y/1.ts, y/2.ts
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft