claude-code - 💡(How to fix) Fix [FEATURE] Reduce or make configurable the 300ms debounce on vim mode statusline updates

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Root Cause

The built-in vim mode indicator (-- INSERT --) updates instantly because it's rendered directly by the TUI. But users who want to render vim mode in their custom statusline (with color coding, custom placement, etc.) get a visibly laggy experience. The script itself executes in ~10ms — the debounce dominates perceived latency.

RAW_BUFFERClick to expand / collapse

Preflight Checklist

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

Problem Statement

When rendering vim.mode in a custom statusline script, there's a noticeable ~300ms delay between pressing Escape (or entering INSERT) and the statusline reflecting the mode change. Per the docs, event-driven statusline updates are debounced at 300ms.

The built-in vim mode indicator (-- INSERT --) updates instantly because it's rendered directly by the TUI. But users who want to render vim mode in their custom statusline (with color coding, custom placement, etc.) get a visibly laggy experience. The script itself executes in ~10ms — the debounce dominates perceived latency.

Proposed Solution

Any of these would work:

  1. Reduce the debounce for vim mode toggle events — mode changes are cheap to detect and users expect instant feedback (matching terminal vim/neovim behavior)
  2. Make the debounce configurable — e.g., a debounceMs field in the statusLine config object
  3. Skip debounce entirely for vim mode toggles — treat them as high-priority events since they're user-initiated and latency-sensitive

Alternative Solutions

  • Keeping the built-in vim mode indicator visible alongside the custom statusline — but this creates visual duplication, and hideVimModeIndicator doesn't appear to work yet (#53556)
  • Polling with a low refreshInterval — but 1 second (the minimum) is far too slow for mode switching

Priority

Medium - Would be very helpful

Feature Category

Interactive mode (TUI)

Use Case Example

  1. User enables vim mode and configures a custom statusline that renders vim.mode with color coding (e.g., purple for INSERT, blue for NORMAL)
  2. User sets hideVimModeIndicator: true to avoid showing the mode twice
  3. User presses Escape to switch to NORMAL mode
  4. ~300ms passes before the statusline updates — feels sluggish compared to the instant built-in indicator
  5. With a lower or configurable debounce, the custom indicator would feel as responsive as the built-in one

Additional Context

  • Claude Code v2.1.112, macOS
  • Related: #53556 (hideVimModeIndicator not working), #53881 (vim mode indicator positioning)

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING