Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Lineno CopyNew to Visual Studio Code? Get it now.
Lineno Copy

Lineno Copy

JackiMa Tools

|
1 install
| (0) | Free
Copy editor file locations as path:line or path:start-end, optionally with a fixed prompt for CLI coding tools.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Lineno Copy

A small VS Code/Cursor extension for copying source locations in a CLI-friendly format.

Default copied locations:

src/app.ts:12
src/app.ts:12-18

Use it when you want to paste exact code locations into Codex CLI, Claude Code, Gemini CLI, Aider, or any other terminal-based coding assistant.

Commands

Command Shortcut Output
Lineno Copy: Copy Location Ctrl+Alt+C / macOS Cmd+Alt+C path:line or path:start-end
Lineno Copy: Copy Location with Prompt Ctrl+Alt+Shift+C / macOS Cmd+Alt+Shift+C path:line / path:start-end plus a configurable fixed prompt

The commands are also available from the editor context menu, command palette, and the status bar copy button.

Default prompt output

src/app.ts:12-18

Please explain the meaning, purpose, and role of the code at the referenced location(s) in this codebase.

This prompt is controlled by linenoCopy.promptText.

Behavior

  • Empty selection: copies the current cursor line.
  • Multi-line selection: copies a line range.
  • Multiple selections/cursors: copies one location per selection by default.
  • Workspace-relative paths are used by default, because CLI tools usually run from the project root.
  • Whole-line mouse selections that end at column 0 of the next line are normalized to the intended selected lines.

Settings

Setting Default Purpose
linenoCopy.pathStyle relative Use relative or absolute paths.
linenoCopy.includeWorkspaceFolder false Prefix relative paths with the workspace folder name. Useful for multi-root workspaces.
linenoCopy.useForwardSlashes true Normalize path separators to /.
linenoCopy.referencePrefix empty Add a prefix before each location, such as @.
linenoCopy.copyAllSelections true Copy all selections/cursors instead of only the primary selection.
linenoCopy.includeColumnNumbers false Include start/end columns.
linenoCopy.promptText English explanation prompt Fixed prompt text used by Copy Location with Prompt.
linenoCopy.copyNotification statusBar Use statusBar, information, or none.
linenoCopy.showStatusBarButton true Show or hide the status bar copy button.

linenoCopy.promptText normally behaves as fixed text appended after the location(s). If it contains placeholders, it becomes the full output template.

Supported placeholders: {reference}, {references}, {file}, {line}, {lineRange}.

Example template:

Explain this code and suggest safe refactors:

{references}

Publishing

Package the extension:

npx @vscode/vsce package --no-dependencies

Publish to VS Code Marketplace:

npx @vscode/vsce publish --packagePath lineno-copy-0.1.0.vsix

The VS Code Marketplace extension ID is:

JackMa-Tools.lineno-copy

Publish to Open VSX, if needed for Cursor / Open VSX users:

npx ovsx publish lineno-copy-0.1.0.vsix -p <token>

License

MIT

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