VS Code extension that copies the relative file path with line number(s) to clipboard.
- Single line:
@src/app/page.tsx#7 - Multiple lines:
@src/app/page.tsx#5-10
- Place cursor on a line or select multiple lines
- Press
Cmd+I(macOS) - Path is copied to clipboard, status bar shows confirmation
Add to your keybindings.json:
{
"key": "cmd+i",
"command": "copyPathWithLine.copy",
"when": "editorTextFocus"
}Symlink to VS Code extensions directory:
ln -sf /path/to/copy-path-with-line ~/.vscode/extensions/copy-path-with-lineThen restart VS Code.
MIT