Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Relative path and lineNew to Visual Studio Code? Get it now.
Relative path and line

Relative path and line

Benjamin Gerfelder

|
2,894 installs
| (1) | Free
Copy workspace relative path (and line number) of active file.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

relative-path-and-line

Extension for visual studio code, exposes commands to copy workspace relative path (optionally line number) of active file to clipboard.

Features

Exposes two commands, accessible by command palette ("Files: Copy..."), no keybindings but define them as you want:

  • relative-path-and-line.copyRelativePath

Copies the workspace relative path of current active file to the clipboard.

  • relative-path-and-line.copyRelativePathAndLine

Copies the workspace relative path of current active file and cursor line number separated by colon to the clipboard.

Requirements

Linux:

  • requires xclip

Known Issues

Linux:

  • requires xclip

Windows:

  • untested

OSX:

  • untested

Release Notes

Users appreciate release notes as you update your extension.

0.1.0

Initial release


Enjoy!

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