VS Code Extensions
Copy Line Ref

Copy Line Ref

by copy-line-ref

Right-click to copy file relative path with selected line numbers (e.g. src/app.ts:10-20)

Downloads

11

Rating

— (0)

Version

0.1.0

Last updated

Jul 17, 2026

Select code in VS Code, right-click → Copy Line Reference to copy the file's relative path with line numbers to your clipboard.

Output Format

  • Single line selected: src/app.ts:10
  • Multiple lines selected: src/app.ts:10-20

Usage

  1. Select code in the editor
  2. Right-click → Copy Line Reference
  3. Paste anywhere — chat, PR description, issue, etc.

Use Case

When discussing code with AI tools (Claude Code, etc.) or teammates, quickly reference exact code locations without manually typing file paths and line numbers.

License

MIT

Related extensions