Create files from the path header in your clipboard. Copy code that starts with a // path/to/file.ext comment, hit the shortcut, and the file is created in the right place with the content pasted in.
Features
Extracts the target path from the header comment in the copied code
Works with .ts (header on line 1) and .vue (header inside <script setup>) — any commented path in the first lines
Dual path resolution: monorepo-aware (full header path from the workspace root) with fallback to the project's src/ folder
Creates intermediate folders automatically (only below an existing base — never invents the base)
If the file already exists, asks to overwrite or create a numbered copy (name (1).ext)
Safety checks: rejects absolute paths and .., and never writes outside the workspace
Opens and reveals the created file in the Explorer
Usage
Copy a file whose first lines contain a header comment with its path:
Press ⌃⌘V (macOS) or Ctrl+Alt+V (Windows/Linux), or click the new-file icon in the Explorer title bar, or run Smart Paste (criar arquivo do header do clipboard) from the Command Palette.
The file is created at the resolved path with the clipboard content, opened, and revealed in the Explorer.
Path resolution
Given a header like gestor-frontend/src/features/gestor/telemetria/RootClientPage.vue:
Monorepo: if the first segment (gestor-frontend/) exists in the workspace root, the full header path is used.
Project: otherwise, the path is cut from src/ onward and resolved against the workspace's own src/ folder — if it exists.
If neither base exists, nothing is created and an error is shown.
Subfolders below the resolved base are created as needed (new feature folders just work).
How it works
The extension reads the clipboard, scans the first 15 lines for a comment line matching a relative path with an extension (dotfolders like .vscode/ included), resolves the destination as above, writes the clipboard content to it, and opens the result.