claude-code - 💡(How to fix) Fix feat: emit ANSI cursor shape escape sequences based on VIM mode

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…

When editorMode is set to "vim" in settings.json, Claude Code should emit ANSI cursor shape escape sequences when switching between normal and insert mode — just like full Vim/Neovim does.

Root Cause

When editorMode is set to "vim" in settings.json, Claude Code should emit ANSI cursor shape escape sequences when switching between normal and insert mode — just like full Vim/Neovim does.

RAW_BUFFERClick to expand / collapse

Summary

When editorMode is set to "vim" in settings.json, Claude Code should emit ANSI cursor shape escape sequences when switching between normal and insert mode — just like full Vim/Neovim does.

Desired behavior

  • Normal mode → block cursor (\e[2 q)
  • Insert mode → line/bar cursor (\e[6 q)
  • Replace mode → underline cursor (\e[4 q)
  • On exit, restore the terminal's original cursor shape (\e[0 q)

Why

Terminal cursor shape is one of the most useful visual indicators of the current VIM mode. Without it, users in vim editor mode have no passive feedback about which mode they're in — they have to look at status text (if any) or try typing to find out.

Most modern terminals (iTerm2, Ghostty, WezTerm, Kitty, etc.) support these escape sequences natively. Full Vim/Neovim emits them by default. It would be a low-effort, high-value addition to Claude Code's VIM mode.

References

  • ANSI cursor shape sequences: ESC [ Ps SP q (DECSCUSR)
  • Ps = 0, 1 → blinking block; Ps = 2 → steady block
  • Ps = 3 → blinking underline; Ps = 4 → steady underline
  • Ps = 5 → blinking bar; Ps = 6 → steady bar

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

claude-code - 💡(How to fix) Fix feat: emit ANSI cursor shape escape sequences based on VIM mode