
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

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
- Open any file in VS Code
- Look for the copy icon in the right corner of the editor title bar
- Click the button to copy the relative path
- The path is now in your clipboard, ready to paste
Installation
From VSIX File
- Download the
.vsix file from the latest release
- Open VS Code
- Press
Ctrl+Shift+P (or Cmd+Shift+P on Mac)
- Type "Extensions: Install from VSIX"
- Select the downloaded
.vsix file
From Source
- Clone this repository
- Run
npm install or pnpm install
- Run
npm run compile or pnpm run compile
- 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!
| |