TempNate
A powerful VSCode extension to quickly insert reusable templates based on the file type you're working with — using fuzzy search, suffix-based folders, and real-time previewing.
Features
- 🔍 Fuzzy search through template files by subpath (like
curl/get.sh
)
- 📂 Organize templates by file suffix (
ts
, sh
, js
, etc.)
- ⌨️ Keyboard navigation with
Ctrl+N
/ Ctrl+P
, arrow keys, and mouse
- 🧠 Custom suffix mappings (
tsx
→ ts
, etc.)
- 📁 Fully configurable template paths via
settings.json
Getting Started
1. Organize Your Templates
Structure your template folders like this:
~/templates/
├── ts/
│ └── hook/useFetch.ts
├── sh/
│ └── curl/get.sh
└── js/
└── utils/logger.js
Each suffix (like ts
, sh
) maps to files for that file type.
Open your settings.json
and add:
"tempnate.paths": [
"~/templates/",
],
"tempnate.similarSuffixes": [
{ "when": "tsx", "use": "ts" },
{ "when": "jsx", "use": "js" }
],
"tempnate.ignore": [
"node_modules",
".DS_Store"
]
paths
: Root folders where your template suffix folders live.
similarSuffixes
: Map complex suffixes to simpler ones.
ignore
: Ignored files or folders.
Usage
- Open any file in VSCode.
- Run command: TempNate (via Cmd+Shift+P or your keybinding).
- Start typing the template name (e.g.
ultsh
to match curl/get.sh
).
- Press Enter to insert the content at the cursor position.
Key Navigation
- ↑ / ↓: Navigate the list
- Ctrl+N / Ctrl+P: Same as arrow keys
- Enter: Insert selected template
- Cmd+Enter: Insert with preview (macOS)
- Alt+Click: Preview file (in progress)
Example
- Open Visual Studio Code
- Open a file with the suffix .sh
- Cmd+Shift+P
- Type TempNate
- Type
ultsh
will match:
📄 curl/get.sh — from ~/templates/sh
Author
Made with ❤️ by thanael
Ideas, and feedback welcome!