VSCode Copilot - Copy Code Reference
A VSCode extension that adds a floating button near selected text to copy formatted file path with line numbers.
Features
- When you select text in any file, a CodeLens button appears
- Click the button to copy a reference in the format:
relative/path/to/file: startLine - endLine
- Works with any file type
- Uses relative path from workspace root
Usage
- Select some text in your editor
- Click the "Copy Reference" button that appears
- The formatted reference is copied to your clipboard
Example
If you select lines 10-15 in src/utils/helper.ts, the copied text will be:
src/utils/helper.ts: 10 - 15
Configuration
You can enable/disable the extension via settings:
vscodeCopilot.enable: Enable/disable the code reference button (default: true)
License
MIT
| |