Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Copy File Path with Line Numbers (AI Prompt)New to Visual Studio Code? Get it now.
Copy File Path with Line Numbers (AI Prompt)

Copy File Path with Line Numbers (AI Prompt)

avepha

|
2 installs
| (0) | Free
Copy deterministic file paths with line numbers for prompts, reviews, and notes.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Copy File Path with Line Numbers (AI Prompt)

Copy deterministic file paths with line numbers from the active VS Code editor in one keypress.

What it does

Copy File Path with Line Numbers (AI Prompt) is a focused developer utility for producing a clean path:line or path:start-end reference in one step. It is especially helpful for AI prompting, while staying useful for code reviews, bug reports, and personal notes.

It always produces POSIX-style slash paths with normalized path:line or path:start-end output for the active saved local file.

  • Absolute command: /full/path/to/file.ts:42
  • Relative command: src/file.ts:42
  • Multi-line selection: src/file.ts:42-57

Commands

Command ID Command Palette title
copyFilePathWithLineNumbers.copyAbsoluteReference Copy Absolute File Path with Line Numbers
copyFilePathWithLineNumbers.copyRelativeReference Copy Relative File Path with Line Numbers

Default shortcuts

Platform Absolute Relative
macOS ⌥⇧C ⌥C
Windows / Linux Ctrl+Alt+Shift+C Ctrl+Alt+C

These defaults match the shipped package.json manifest contributions.

Supported editor state

  • Saved local text files

This extension only supports saved local files. Unsupported states fail clearly with No saved local text file is active instead of copying something ambiguous.

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