Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Copy Selection InfoNew to Visual Studio Code? Get it now.
Copy Selection Info

Copy Selection Info

candycium

|
2 installs
| (0) | Free
Copy file path and selected line range to clipboard for AI coding assistants
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

📋 Copy Selection Info

VS Code Version License Downloads Rating

🚀 The ultimate VS Code extension for AI-powered development

Copy file paths and line ranges instantly - perfect for Claude, ChatGPT, and other AI assistants


🎯 Why You Need This

Ever struggled to explain which code you want help with? 🤔

Before: "Hey AI, can you look at the function around line 120ish in the main.js file, it's the one that handles user input..."

After: 📄 src/components/UserHandler.js:118-135

✨ One click, one copy, perfect precision


✨ What's New in 2.0.0

🎪 Multi-Cursor Magic

  • 🔄 Multiple selections? No problem! Handle them all at once
  • 🎛️ Smart modes: Combine, separate, or choose interactively
  • ⚡ Perfect for batch AI queries

🧠 Smarter Context

  • 🏷️ Symbol detection - Automatically includes function names
  • 🔢 Column precision - Add exact character positions
  • 📊 Live status bar - See what will be copied in real-time

📝 Documentation Power

  • 🔗 Markdown links - Generate [file:line](https://github.com/ruiwarn/copy-selection-info/blob/HEAD/link) instantly
  • 📚 Perfect for PRs and docs

🚀 Quick Start

Installation

  1. Press Ctrl+Shift+X (or Cmd+Shift+X on Mac)
  2. Search: "Copy Selection Info"
  3. Click Install 🎉

Basic Usage

  1. Select any code (or just place cursor anywhere)
  2. Press Ctrl+Shift+C (or Cmd+Shift+C on Mac)
  3. Paste to AI assistant → Perfect context every time!

🎪 All Access Methods

Method How to Use Best For
⌨️ Keyboard Ctrl+Shift+C Quick everyday use
🖱️ Right-Click Right-click → "Copy Selection Info" Mouse users
📊 Status Bar Click status bar item Visual feedback & quick access
🔍 Command Palette Ctrl+Shift+P → "Copy Selection Info" When you forget shortcuts

⚡ Power Features

🎯 Multi-Cursor Mastery

📍 Selection 1: src/main.js:15-20
📍 Selection 2: src/main.js:45-50
📍 Selection 3: src/utils.js:102

📋 Combined Output:
src/main.js:15-20
src/main.js:45-50
src/utils.js:102

🏷️ Smart Symbol Detection

🔍 With symbols enabled: "handleUserInput in src/components/UserHandler.js:118-135"
📝 Without symbols: "src/components/UserHandler.js:118-135"

🔗 Markdown Link Generation

📄 Perfect for GitHub issues and documentation:
[UserHandler.js:118-135](https://github.com/ruiwarn/copy-selection-info/blob/HEAD/src/components/UserHandler.js:118-135)

⚙️ Customize Everything

🎛️ Essential Settings

{
  "copySelectionInfo.multiCursor": "combine",     // "combine" | "separate" | "ask"
  "copySelectionInfo.includeColumnNumbers": false,
  "copySelectionInfo.includeSymbolName": false,
  "copySelectionInfo.showStatusBarItem": true
}

🛠️ Advanced Options

Setting What It Does When to Use
useAbsolutePath Full file path instead of relative When AI needs exact location
lineRangeSeparator Change - to : in ranges Personal preference
pathSeparator Force / or \ separators Cross-platform consistency
wslCompatibility Smart WSL path handling Windows + WSL environments

🎪 Real-World Examples

💻 For AI Code Review

📝 Your prompt: "Review this function for potential issues:"
📋 Copied: "src/auth/jwt-validator.js:42-67"

✨ AI gets: Perfect context + exact location

📚 For Documentation

📄 In README.md:
See [authentication logic](https://github.com/ruiwarn/copy-selection-info/blob/HEAD/src/auth/jwt-validator.js:42-67) for details.

🔗 Auto-generated markdown link!

🐛 For Bug Reports

🐛 GitHub Issue:
Bug in user validation at src/components/UserForm.js:128-145

📍 Everyone knows exactly where to look!

🎯 Pro Tips

⚡ Speed Up Your Workflow

  1. Enable status bar - See what will be copied before you click
  2. Turn on symbol detection - Get function names automatically
  3. Use multi-cursor mode - Handle multiple code sections at once
  4. Try markdown links - Perfect for documentation

🎨 Keyboard Customization

{
  "key": "ctrl+alt+c",
  "command": "extension.copySelectionInfo",
  "when": "editorTextFocus"
}

🔄 Comparison

Feature Copy Selection Info Manual Method Other Extensions
✅ Multi-cursor support ✨ Native ❌ Impossible ⚠️ Limited
✅ Symbol detection ✨ Automatic ❌ Manual lookup ⚠️ Rare
✅ Status bar integration ✨ Live updates ❌ None ⚠️ Static
✅ WSL compatibility ✨ Seamless ❌ Error-prone ⚠️ Basic
✅ Zero learning curve ✨ Instant ❌ Complex ⚠️ Setup required

💬 What Users Say

"Game changer for my AI workflow! No more explaining line numbers." - Senior Developer

"The multi-cursor feature alone saved me hours of copy-pasting." - Full Stack Engineer

"Symbol detection is like magic - it knows exactly which function I mean!" - Frontend Dev


🤝 Community & Support

🐛 Found a Bug?

  • Report on GitHub

💡 Feature Ideas?

  • Start a Discussion

⭐ Love It?

  • Rate on VS Code Marketplace

📄 License & Credits

MIT License - View License

Made with ❤️ by candycium


⭐ Star this repo if it helps you code smarter!

🚀 Happy coding with your AI assistant!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft