Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Copy as URINew to Visual Studio Code? Get it now.
Copy as URI

Copy as URI

dylcdav

|
3 installs
| (0) | Free
Adds a command that copies the current file and line number as a VSCode-schema URI.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Copy as URI

Copy the current file location as a VSCode URI scheme link, perfect for sharing code references.

Features

Two commands to copy the current file and line as VSCode URIs:

  • Copy as URI - Copies URI in format: vscode://file/C:/path/to/file.cs:10:5
  • Copy as URI Hyperlink - Copies markdown hyperlink: [`file.cs:10`](vscode://file/C:/path/to/file.cs:10:5)

Usage

Command Palette

  1. Open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P)
  2. Search for "Copy as URI" or "Copy as URI Hyperlink"
  3. The URI is copied to your clipboard

Context Menu

  1. Right-click in the editor
  2. Navigate to Copy As submenu
  3. Select either command

Use Cases

  • Share specific code locations with teammates
  • Reference code in documentation or markdown files
  • Create clickable links to files and lines in VS Code

Requirements

VS Code 1.107.0 or higher

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