Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>PathLineNew to Visual Studio Code? Get it now.
PathLine

PathLine

Wang Qin

|
3 installs
| (0) | Free
Copy relative file paths with line numbers in one keystroke.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

PathLine

Copy the current code location or selection as:

relative/path/to/file:line

or:

relative/path/to/file:startLine-endLine

Examples:

src/parser/foo.cpp:127
src/parser/foo.cpp:127-135

The default shortcut is Ctrl+Shift+/. You can also run PathLine: Copy Reference from the Command Palette.

  • A cursor with no selection copies the current line.
  • A selection within one line copies that line.
  • A multiline selection copies the selected line range.
  • You can override the shortcut from VS Code's Keyboard Shortcuts editor.

Local development

npm install
npm run compile
npm test

Open this directory in VS Code and press F5, or run the Run PathLine launch configuration, to start an Extension Development Host with PathLine loaded.

License

MIT © 2026 Wang Qin

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