Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Selected Lines ReferenceNew to Visual Studio Code? Get it now.
Selected Lines Reference

Selected Lines Reference

Anil Zeybek

|
2 installs
| (0) | Free
Copy the active file path and selected line range in a compact text format.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Selected Lines Reference

Copy the active workspace-relative file path and selected line range in this format:

extensions/proto/Cargo.toml:6-13

For a single line:

extensions/proto/Cargo.toml:6

Usage

Select code in an editor and run:

Selected Lines Reference: Copy File Path and Selected Line Range

Default shortcuts:

  • macOS: Ctrl+Shift+Alt+Cmd+C
  • Windows/Linux: Ctrl+Shift+Alt+Meta+C

Development

Open this folder in VS Code and press F5 to launch an Extension Development Host.

Packaging

Install dependencies:

npm install

Create a .vsix package:

npm run package

Publish to the Marketplace:

npm run publish
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft