Support cursor shape changes for vim mode (beam in insert, block in normal)
Status Open
Maintainer reply None cached
Activity 4 comments · opened Mar 9, 2026
Feature Request
When vim mode is enabled (via /vim or /config), the cursor shape should change based on the current mode:
- Insert mode: thin/beam cursor (
\e[5 qor\e[6 q) - Normal mode: block cursor (
\e[1 qor\e[2 q)
Current Behavior
The cursor appearance stays the same regardless of vim mode. The only visual indicator is the NORMAL/INSERT text in the prompt.
Expected Behavior
Claude Code should emit DECSCUSR escape sequences when switching between vim modes, similar to how shells with vi mode (zsh vi-mode, bash vi-mode) and terminal editors (neovim, vim) change the cursor shape.
Most modern terminals support this (iTerm2, WezTerm, Ghostty, Kitty, Alacritty, Windows Terminal, etc.), so this would provide a natural and familiar visual cue for vim mode users.
Showing cached comments. Read the full discussion on GitHub ↗
3 Comments
Until native DECSCUSR support is added, you can approximate this with terminal-level vim mode cursor shape changes.
If you use zsh with vi-mode, the terminal cursor shape already changes — Claude Code inherits the terminal settings. Add to ~/.zshrc:
Note: this only affects your shell's vi-mode, not Claude Code's built-in /vim mode. Claude Code's input handler doesn't emit cursor shape escape sequences — that would need to be added in the TUI rendering layer.
Emitting the DECSCUSR shape escape sequences should be a pretty quick fix. Bumping this again for visibility.
+1, would love to see this. Cursor shape switching between block (normal) and beam (insert) via DECSCUSR (
\e[2 q/\e[6 q) is standard behavior in Neovim and other vim-mode-aware editors — makes it much easier to tell which mode you're in at a glance without reading the status text.