[BUG] Vim mode caret stays as block in INSERT mode - should change to bar like standard vim
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When vim mode is enabled (/vim), the caret remains a solid block rectangle in both NORMAL and INSERT modes. There is no visual distinction between modes via caret shape. The only way to tell which mode you're in is to glance at the small mode label in the status area, which breaks the flow of editing.
What Should Happen?
Caret shape should change when switching vim modes, matching standard vim/neovim behavior:
- NORMAL mode -> block caret
- INSERT mode -> thin bar/line caret
This is core vim UX that users rely on for spatial awareness. Every major terminal-based vim implementation does this. The fix is straightforward - terminals universally support caret shape via ANSI escape sequences:
\e[2 q -> steady block (NORMAL mode)
\e[6 q -> steady bar (INSERT mode)
Wherever the vim mode state transitions between NORMAL and INSERT, emit the appropriate escape sequence. On exit/cleanup, restore the user's original caret style.
Error Messages/Logs
Steps to Reproduce
- Run claude
- Type /vim to enable vim mode
- Observe cursor is a block (NORMAL mode) - correct
- Press i to enter INSERT mode
- Observe cursor is still a block - incorrect, should be a thin bar
- Press Escape to return to NORMAL mode
- No visual change occurred at any point
Claude Model
Sonnet (default)
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.1.44
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
This was previously reported as #13924 but was auto-closed by the duplicate detection bot as a duplicate of #10215, which is about text color customization - not vim mode caret shape. Please don't auto-close this as a duplicate of that unrelated issue:
- #13924 - closed as duplicate of #10215 (which is about text color customization, not vim cursor shape)
- #26231 - closed as duplicate of #10215 (same incorrect duplicate detection)
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗