Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>File Line CopyNew to Visual Studio Code? Get it now.
File Line Copy

File Line Copy

file-line-copy

|
1 install
| (0) | Free
Copy file path with line numbers for Coding Agents
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

File Line Copy

Copy file path with line numbers for Coding Agents like OpenCode.

Usage

  1. Open any file in the editor
  2. Select lines you want to reference (or nothing to copy just the path)
  3. Press shortcut:
Shortcut Action
Ctrl+Shift+C / Cmd+Shift+C Copy relative path with line numbers
Ctrl+Shift+Alt+C / Cmd+Shift+Alt+C Copy absolute path with line numbers

Examples of copied text:

  • @src/utils.ts#L12-L15 — multi-line selection
  • @src/utils.ts#L12 — single line selected
  • @src/utils.ts#L5-L8,L12-L14 — multiple selections merged
  • @src/utils.ts — no selection, just file path

Settings

  • fileLineCopy.prefix (default @): Prefix character for the reference
  • fileLineCopy.showNotification (default true): Show status bar notification after copying
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft