Feature Request: Copy/Paste Lines by Range in Claude Code
Resolved 💬 3 comments Opened Aug 17, 2025 by Atman36 Closed Jan 13, 2026
Feature Request: Copy/Paste Lines by Range in Claude Code
Summary
Add ability to copy specific line ranges from files (e.g., lines 56-94) and paste them to target locations - a simple but powerful copy/paste function that could save significant development time. And also save millions of dollars on electricity consumption.
Proposed Implementation
Command Line Interface
# Copy lines 56-94 from source.py and insert at line 120 in target.py
claude copy source.py 56:94 target.py:120
# Copy to end of file
claude copy source.py 56:94 target.py:end
# Copy to clipboard for manual placement
claude copy source.py 56:94 --clipboard
Interactive Mode
claude> copy source.py 56:94
[Lines copied to buffer]
claude> paste target.py 120
[Lines inserted at specified location]
Use Cases
- Code Refactoring: Move functions/classes between files
- Template Creation: Copy common patterns to new files
- Documentation: Extract code examples for docs
- Testing: Copy production code for test scenarios
- Legacy Migration: Move code between old/new architectures
Business Impact
This basic functionality could streamline countless development workflows, reduce context switching between editors, and save substantial time across development teams.
Current Workaround
Manual copy/paste from external editors, but native Claude Code integration would be far more efficient and maintain the terminal-first workflow.
Technical Considerations
- Should respect file permissions and safety checks
- Could integrate with existing
viewandeditcommands - Maintains compatibility with current file editing workflows
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗