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