Copy with File Path
https://github.com/yutakahashi114/copy-with-file-path
A Visual Studio Code extension that copies selected text along with file path information to the clipboard.
Features
This extension provides the following functionality:
- Copy with File Path: Copy selected text along with the relative file path and line number information
- Multiple copy modes:
- If no text is selected: Copies file path with current line number
- If single line is selected: Copies file path, line number, and selected text
- If multiple lines are selected: Copies file path, line range, and selected text
Usage
- Select text in the editor (optional)
- Right-click and select "Copy with File Path" from the context menu
- Or use the keyboard shortcut:
Cmd+Alt+C (Mac) / Ctrl+Alt+C (Windows/Linux)
- The text with file path information is copied to your clipboard
Example Output
Requirements
- Visual Studio Code 1.101.0 or higher
Extension Settings
This extension does not contribute any VS Code settings.
Known Issues
Currently, there are no known issues.
Release Notes
0.0.1
Initial release of Copy with File Path extension featuring:
- Copy selected text with file path and line number information
- Support for multiple copy modes (no selection, single line, multiple lines)
- Keyboard shortcut and context menu integration
Development
Building the Extension
# Install dependencies
npm install
# Compile the extension
npm run compile
Testing
# Run tests
npm run test
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This extension is released under the MIT License.
| |