Copy code references — @src/foo.ts:10-20 (relative) or @/Users/you/project/src/foo.ts:10-20 (absolute) — straight to the clipboard, ready to paste into Claude Code, the built-in VS Code Chat, or any other AI input.
Works with both VS Code and Cursor.
Commands
Command
Default shortcut
Output
Copy Relative Code Reference for AI
Ctrl+Shift+C / Cmd+Shift+C
@src/foo.ts:10-20
Copy Absolute Code Reference for AI
Ctrl+Shift+Alt+C / Cmd+Shift+Alt+C
@/Users/you/project/src/foo.ts:10-20
With just a caret (no selection), each command copies a single-line reference (e.g. @src/foo.ts:10).
Both commands also appear in the editor's right-click menu under the Copy/Paste section.
Rebind either shortcut independently from VS Code's Keyboard Shortcuts UI.
The relative command falls back to the absolute path when the file is outside every workspace folder.