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

Code Indicator

Yanun

|
2 installs
| (0) | Free
Copy or send the current selection location in an rg-friendly format.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Code Indicator

English 繁體中文 简体中文

Code Indicator is a VS Code extension built for CLI coding agents such as Codex, Claude Code, and OpenCode.

It copies or sends the current editor location in an rg-friendly format, so you can quickly point an agent at the exact file, line, column, or selected range you want it to inspect or change.

Why

CLI coding agents work best when they receive precise code locations. Instead of manually typing paths and line numbers, Code Indicator lets you select code, right-click, and send the location directly to your terminal.

When no text is selected, Code Indicator uses the cursor position.

Commands

  • codeIndicator.copySelectionLocation
  • codeIndicator.sendSelectionLocationToActiveTerminal
  • codeIndicator.copySelectionLocationAndSendToActiveTerminal

Each command is available from the Command Palette, editor context menu, and VS Code Keyboard Shortcuts.

Settings

The editor context menu items can be shown or hidden individually. Terminal focus after sending is enabled by default. The trailing character sent to the terminal defaults to a space.

{
  "codeIndicator.contextMenu.copyLocation": true,
  "codeIndicator.contextMenu.sendLocationToTerminal": true,
  "codeIndicator.contextMenu.copyAndSendLocationToTerminal": true,
  "codeIndicator.terminal.focusAfterSend": true,
  "codeIndicator.terminal.trailingCharacter": "space"
}

Output Format

relative/path.ext:startLine:startColumn-endLine:endColumn

Positions are 1-based. The end position uses VS Code's exclusive selection end.

Examples:

src/extension.ts:10:3-12:18
src/extension.ts:10:3-10:3

Paths are relative to the containing workspace folder. Files outside the workspace use absolute paths.

License

MIT

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