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
- Select code in the editor
- Right-click → Copy Line Reference
- 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