Skip to content
| Marketplace
Sign in
Visual Studio Code>Keymaps>copy relative path buttonNew to Visual Studio Code? Get it now.
copy relative path button

copy relative path button

kazoottt

|
3 installs
| (0) | Free
copy the relative path of the active file by click the button
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Copy Relative Path Button

VS Marketplace Installs Rating Latest VSIX

A simple VS Code extension that adds a button to the editor title bar for copying the relative path of the active file to the clipboard.

Usage

Copy relative path demo

Features

  • One-click path copying: Click the copy button in the editor title bar to instantly copy the relative path of the currently opened file.
  • Visual feedback: After successful copying, the button icon changes to a checkmark for 3 seconds to confirm the action.
  • Workspace awareness: Automatically detects if you're in a workspace and copies relative or absolute paths accordingly.
  • No configuration needed: Works out of the box with no additional settings required.

How to Use

  1. Open any file in VS Code
  2. Look for the copy icon in the right corner of the editor title bar
  3. Click the button to copy the relative path
  4. The path is now in your clipboard, ready to paste

Installation

  • From Marketplace: kazoottt.copy-relative-path-button
  • From GitHub Releases (VSIX): Latest release

From VSIX File

  1. Download the .vsix file from the latest release
  2. Open VS Code
  3. Press Ctrl+Shift+P (or Cmd+Shift+P on Mac)
  4. Type "Extensions: Install from VSIX"
  5. Select the downloaded .vsix file

From Source

  1. Clone this repository
  2. Run npm install or pnpm install
  3. Run npm run compile or pnpm run compile
  4. Press F5 to open the extension in development mode

Development

To contribute or modify the extension:

git clone <repository-url>
cd copy-relative-path-button
pnpm install
pnpm run compile
# Then press F5 in VS Code to test

Release Notes

0.0.1

  • Initial release with copy relative path functionality and visual feedback system

Enjoy copying relative paths effortlessly!

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