Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Copy Code Reference - File & Line CopierNew to Visual Studio Code? Get it now.
Copy Code Reference - File & Line Copier

Copy Code Reference - File & Line Copier

Cledson Medeiros

|
1 install
| (0) | Free
Copy file and line references from the editor.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Copy Code Reference

Copy Code Reference is a VS Code extension that makes it easy to copy code references with the file name and line number directly from the editor.

Features

The extension provides commands to copy references in three formats:

  • Filename + line
  • Relative path + line
  • Absolute path + line

Example output:

  • extension.ts:12
  • src/extension.ts:12
  • /home/user/project/src/extension.ts:12

How to use

  1. Open a file in the VS Code editor.
  2. Select a line or a code snippet.
  3. Right-click inside the editor.
  4. Open the Copy Reference submenu.
  5. Choose the reference format you want to copy.

The selected reference will be copied to the clipboard automatically.

Available commands

  • Copy Filename Reference
  • Copy Relative Path Reference
  • Copy Absolute Path Reference

Local installation

To install it locally on your machine:

npm install
npm run compile

Then open the project in VS Code and run the extension in a development window.

Development

Build

npm run compile

Watch mode

npm run watch

Requirements

  • Node.js
  • VS Code
  • TypeScript

License

This project is licensed under the MIT License.

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