VS Code Extensions
Copy Code Reference - File & Line Copier

Copy Code Reference - File & Line Copier

by CledsonMedeiros

Copy file and line references from the editor.

Downloads

1

Rating

(0)

Version

0.0.1

Last updated

Jul 20, 2026

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.

Related extensions