[FEATURE] Expose Vim Mode State in Statusline JSON

Resolved 💬 11 comments Opened Jan 8, 2026 by Vvkmnn Closed May 24, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

I use Vim mode in Claude Code with a custom statusline script. The statusLine.command JSON payload exposes model, cost, context, and workspace data—but not the Vim mode state.

Current Behavior

The Vim mode indicator is rendered by Claude Code's internal UI and cannot be customized:

🤖 Opus | 📁 my-project | main | $0.42    ← customizable via statusLine.command
-- INSERT -- ▐▐ plan mode on               ← hardcoded, not exposed

The statusLine.command JSON payload includes session, model, cost, and workspace data, but no Vim mode state:

{
  "session_id": "...",
  "model": { "id": "...", "display_name": "..." },
  "workspace": { "current_dir": "...", "project_dir": "..." },
  "cost": { "total_cost_usd": 0.42, "total_duration_ms": 45000 },
  "context_window": { ... }
  // vi_mode: missing
}

Proposed Solution

Add a vi_mode object to the statusLine.command JSON payload:

{
  "vi_mode": {
    "enabled": true,
    "mode": "insert"
  }
}

This lets users render the Vim mode in their statusline script with custom styling, or omit it entirely.

Alternative Solutions

There's no workaround—the indicator is rendered by Claude Code's internal UI, not exposed to statusline scripts.

Priority

Low - Nice to have

Feature Category

CLI commands and flags

Use Case Example

Example scenario:

  1. I use Claude Code with Vim mode and a custom statusline script
  2. I want to style my Vim mode indicator to match my statusline aesthetic
  3. With this feature, I could render the mode in my script with custom colors/icons
  4. This would save me time because I wouldn't need to live with the hardcoded -- INSERT -- styling

Additional Context

Related Issues

This follows the established pattern of exposing internal state to statusline.sh scripts:

  • #15029session_name
  • #11535 — token usage
  • #13158 — thinking mode
  • #1204 — More Vim motions (open)
  • #2442 — Visual mode (not planned)

View original on GitHub ↗

This issue has 11 comments on GitHub. Read the full discussion on GitHub ↗