Create files and folders from templates with context-aware suggestions and workspace intelligence. A powerful VS Code extension that brings PowerToys NewPlus functionality to your editor.
- Context-Aware Filtering: Automatically suggests templates based on your current location and project type
- Workspace Intelligence: Detects Node.js, Python, Java, and other project types
- File vs Folder Context: Shows appropriate templates when right-clicking files or folders
- File Templates: Individual files with variable substitution
- Folder Templates: Complete directory structures with multiple files
- Variable Support: Built-in variables (
$DATE$,$USER$,$WORKSPACE_NAME$, etc.) - PowerToys Compatible: Uses PowerToys NewPlus template directory structure
- Explorer Context Menu: Right-click to create from templates
- Command Palette: Quick access via
Ctrl+Shift+Pβ "New+" - Progress Feedback: Visual progress for multi-file operations
- Smart Naming: Context-aware default names with validation
From VS Code Marketplace:
- Open VS Code
- Go to Extensions (
Ctrl+Shift+X) - Search for "NewPlus"
- Click Install
From VSIX:
- Download the latest
.vsixfile from releases - Open VS Code
- Run
Extensions: Install from VSIX... - Select the downloaded file
This project achieves SLSA Level 2 compliance:
- β Automated builds using GitHub Actions
- β Version-controlled source in GitHub
- β Provenance generated and signed for all releases
- β Build attestations publicly verifiable
All releases are signed with GitHub Attestations to verify authenticity and integrity.
To verify a release:
Using GitHub CLI:
gh attestation verify newplus-1.0.4.vsix --owner jhaisleyOr verify online:
- Go to Attestations
- Find the artifact you downloaded
- Verify the checksum matches your downloaded file
This ensures the VSIX file you download is the official release from this repository and hasn't been tampered with.
Via Context Menu (Recommended)
- Right-click on any folder in the Explorer
- Select "New+"
- Choose a template (filtered by context)
- Enter a name and any custom variables
- Done! π
Via Command Palette
- Press
Ctrl+Shift+P(Windows/Linux) orCmd+Shift+P(Mac) - Type "New+"
- Select your template
- Follow the prompts
Templates are stored in:
Windows: %LOCALAPPDATA%\Microsoft\PowerToys\NewPlus\Templates
Mac/Linux: ~/.local/share/Microsoft/PowerToys/NewPlus/Templates
File Template Example:
MyComponent.tsx
Folder Template Example:
ReactComponent/
βββ index.tsx
βββ styles.module.css
βββ __tests__/
βββ component.test.tsx
Templates support powerful variable substitution:
| Variable | Description | Example |
|---|---|---|
$DATE$ |
Current date | 2025-10-06 |
$TIME$ |
Current time | 14:30:45 |
$YEAR$ |
Current year | 2025 |
$MONTH$ |
Current month | 10 |
$DAY$ |
Current day | 06 |
$USER$ |
Current user | jhaisley |
$RANDOM$ |
Random number | 42857 |
$UUID$ |
UUID v4 | a1b2c3d4-... |
| Variable | Description |
|---|---|
$WORKSPACE_NAME$ |
Active workspace name |
$TARGET_DIR$ |
Target directory name |
$TARGET_PATH$ |
Full target path |
Note: Custom variable prompts are not currently implemented. Only the built-in and context variables listed above are supported.
| Setting | Type | Default | Description |
|---|---|---|---|
newFromTemplate.templatesPath |
string | %LOCALAPPDATA%\Microsoft\PowerToys\NewPlus\Templates |
Templates directory path |
newFromTemplate.display.hideFileExtensions |
boolean | true |
Hide extensions in picker |
newFromTemplate.display.hideSortingPrefix |
boolean | false |
Hide leading numbers (e.g., 01.) |
newFromTemplate.behavior.replaceVariablesInFilename |
boolean | false |
Enable variables in filenames |
| Command | Description |
|---|---|
New+ |
Create from template |
New+: Open Templates Folder |
Open templates directory |
NewPlus detects your project type and suggests relevant templates:
- Node.js β JavaScript/TypeScript templates
- Python β Python module templates
- Java β Class/interface templates
- Generic β All templates
- β Multi-root workspace support
- β Active editor context awareness
- β Intelligent target directory resolution
- β Real-time name validation
git clone https://github.com/jhaisley/new_plus_ext.git
cd new_plus_ext
npm install
npm run compile
npm testCommands β Services β Models β Utils
β
Template Discovery (lazy loading, parallel)
Variable Substitution (10-level recursion)
Context Detection (workspace intelligence)
Tech Stack:
- TypeScript 5.1+ (strict mode)
- VS Code Extension API 1.104+
- Mocha test framework
- VS Code 1.104.0 or higher
- Node.js 16+ (for development)
Templates not showing?
- Check
newFromTemplate.templatesPathsetting - Verify templates directory exists and is readable
- Reload window:
Developer: Reload Window
Variables not working?
- Enable
newFromTemplate.behavior.replaceVariablesInFilename - Use correct syntax:
$VARIABLE_NAME$ - Check recursion limit (max 10 levels)
Context menu missing?
- Reload VS Code
- Verify extension is enabled
- Right-click on folders or files in Explorer
Contributions welcome! Areas of interest:
- Template examples and starter packs
- Additional project type detection
- Custom variable prompts and enhanced variable features
- UI/UX improvements
See CONTRIBUTING.md for guidelines.
MIT License - see file for details.
- Inspired by Microsoft PowerToys NewPlus
- Built with the VS Code Extension API
- Thanks to all contributors and users! π
Made with β€οΈ by Jordan Haisley