Vim mode: change cursor shape per mode (block in NORMAL, line in INSERT)

Open 💬 1 comment Opened Jun 25, 2026 by Ken-vdE

What I'm trying to do

When using vim mode in the Claude Code input, I want the cursor to reflect the current mode the way standard vim does in a terminal:

  • NORMAL mode -> block cursor
  • INSERT mode -> thin vertical bar / beam cursor

This is the dominant visual convention for vim users and makes the current mode obvious at a glance without reading the status line.

Current behavior

The input cursor shape stays the same regardless of vim mode. The only mode indicator is the NORMAL/INSERT text in the status line. There's no setting in settings.json, no keybinding, and no env var to control cursor shape.

Why Claude Code has to do this

Claude Code renders its own input cursor rather than delegating to the terminal, so the standard escape sequences vim emits (CSI 6 SP q for a steady bar, CSI 2 SP q for a steady block, etc.) don't take effect. The mode-aware cursor shape would need to be implemented inside Claude Code's input rendering.

Proposed solution

Switch the rendered cursor glyph based on vim mode: block for NORMAL/VISUAL, bar for INSERT. Optionally make it configurable, e.g.:

{
  "vim": {
    "cursorShape": {
      "normal": "block",
      "insert": "bar"
    }
  }
}

Impact

Quality-of-life for vim-mode users; matches muscle memory from vim/neovim and other editors.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗