Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>AliJunior Smart PasteNew to Visual Studio Code? Get it now.
AliJunior Smart Paste

AliJunior Smart Paste

Junior Ali

|
1 install
| (0) | Free
Create files from the path header in the copied code and paste the clipboard content
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

VSCode Smart Paste

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

  1. Copy a file whose first lines contain a header comment with its path:
// core/src/features/uac/usuario/uac-usuario-login-orchestrator.ts

export interface UacUsuarioLoginValidarParams {
  // ...
}
  1. 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.

  2. 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:

  1. Monorepo: if the first segment (gestor-frontend/) exists in the workspace root, the full header path is used.
  2. Project: otherwise, the path is cut from src/ onward and resolved against the workspace's own src/ folder — if it exists.
  3. 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.

Requirements

  • VSCode 1.85+
  • macOS, Windows, or Linux

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft