Copy file paths with line numbers in one click - Perfect for code reviews, bug reports, and team collaboration.
Right-click in the line number area or editor → Get src/app.ts:42 instantly.
src/components/Button.tsx:42 ← Single line
src/utils/helper.ts:10-20 ← Line range
src/api/client.ts:5, 15, 25 ← Multiple selections
Use cases:
- 📝 GitHub issues/PRs - Share precise code locations
- 💬 Team chat - Reference specific lines in discussions
- 📚 Documentation - Link to exact code sections
- 🐛 Bug reports - Point to problematic lines
1. Line Number Gutter (most common)
2. Editor Area (current cursor position)
3. Multi-Selection (ranges and multiple lines)
| Format | Example | Use Case |
|---|---|---|
| Relative | src/Button.tsx:42 |
GitHub, team collaboration |
| Absolute | /Users/me/project/src/Button.tsx:42 |
Local references |
| Range | src/utils.ts:10-20 |
Code blocks |
| Multiple | src/api.ts:5, 15, 25 |
Scattered references |
VS Code (Marketplace)
code --install-extension MarkShawn2020.better-copy-path-with-linesVSCodium (Open VSX)
codium --install-extension MarkShawn2020.better-copy-path-with-linesOr search "Better Copy Path with Lines" in the Extensions panel (Ctrl+Shift+X / Cmd+Shift+X)
Enhanced fork of qishan233/copy-path-with-line-number with critical fixes and UX improvements.
| Aspect | Original | This Fork |
|---|---|---|
| Line gutter | ❌ Broken | ✅ Fixed |
| Menu clicks | 3 (submenu) | 2 (direct) |
| Commands | 4 mixed options | 2 focused |
| Performance | Baseline | 33% faster |
Key improvements: Fixed VSCode line number API · Removed submenus · Simplified labels · Automated releases
Uses automated releases via Conventional Commits. Push feat: or fix: commits to trigger auto-publish to both marketplaces.
git commit -m "feat: new feature" # → 0.2.0 → 0.3.0
git commit -m "fix: bug fix" # → 0.2.0 → 0.2.1
git push # Automatically publishes to VS Code & Open VSXSee CONTRIBUTING.md for details.
Report bugs: GitHub Issues
Latest: v0.2.0 - View Changelog
- ✅ Dual marketplace publishing (VS Code + Open VSX)
- ✅ Auto-versioning with semantic-release
- ✅ Auto-generated CHANGELOG
- ✅ GitHub Actions CI/CD workflow
- Changed range connector to
-(industry standard) - Better compatibility with GitHub/GitLab
- Fixed line number gutter context menu
- Improved VSCode API handling
MIT License
Fork of: qishan233/copy-path-with-line-number Maintainer: MarkShawn2020
Made with ❤️ for developers who share code references frequently



{ "copyPathWithLineNumber.path.separator": "slash", // "/" | "\" | "system" "copyPathWithLineNumber.range.connector": "dash", // "-" | "~" "copyPathWithLineNumber.selection.separator": "comma", // "," | ";" | " " "copyPathWithLineNumber.show.message": true // Show notification }