Allow customizing the cursor (color, vim-mode-dependent shape) in Claude Code's TUI

Status Open
Maintainer reply None cached
Activity 0 comments · opened Aug 27, 2026

Summary

Allow Claude Code's terminal UI cursor (color and shape) to be configured, including shape changes based on the CLI's own vim mode.

Problem/Use Case

Claude Code's interactive input hides the terminal's native hardware cursor and draws its own synthetic cursor (a styled character cell) instead of relying on the terminal emulator's cursor rendering. As a result, terminal-level cursor customization — cursor color, and shape that changes based on mode (e.g., block in normal mode, bar/underline in insert mode via DECSCUSR) — has no effect inside Claude Code, even though it works correctly everywhere else in the same terminal (e.g., in Ghostty, and in vim/neovim sessions). Users who rely on vim-mode-dependent cursor shape as a visual cue for which editing mode they're in lose that cue entirely when using Claude Code's editorMode: "vim" setting, since Claude Code's synthetic cursor doesn't reflect NORMAL vs. INSERT mode.

Proposed Solution

Add settings (e.g., in settings.json) to customize the synthetic cursor's appearance:

  • cursorColor (or similar) to control the color of the input cursor indicator.
  • Shape/style that responds to editorMode: "vim" state — e.g., a block-style highlight in NORMAL mode and a bar/underline-style highlight in INSERT mode, mirroring the DECSCUSR convention terminals and vim already use.

As a possible alternative implementation, Claude Code could emit real DECSCUSR/OSC 12 escape sequences to drive the terminal's native cursor instead of (or in addition to) drawing a synthetic one, so terminal-level cursor theming and vim-mode shape switching apply automatically without needing app-specific settings.

Alternatives Considered

  • Relying on terminal emulator config alone (e.g., Ghostty's per-mode cursor styling) — doesn't work today because Claude Code's synthetic cursor bypasses the terminal's real cursor entirely.
  • Switching between fullscreen/inline rendering modes to see if one exposes the real terminal cursor — investigated and doesn't appear to make a difference; both modes use Claude Code's own cursor rendering.

Success Criteria

With editorMode: "vim" enabled and a configured cursor color, the cursor visibly changes shape between NORMAL and INSERT mode, and displays the configured color, consistently in both inline and fullscreen rendering.

Additional Context

This mirrors long-standing terminal/vim conventions (e.g., Ghostty, iTerm2, and most terminals support DECSCUSR-driven shape changes keyed to vim mode). I was migrating an existing Ghostty + vim-mode-cursor workflow to Claude Code's fullscreen mode and vim editor mode, and found the visual mode indicator missing.

View original on GitHub ↗