[FEATURE] Add redo support: Ctrl+R in vim NORMAL mode and a bindable chat:redo action
Problem Statement
Claude Code's input editor supports undo but has no redo in any form:
- Vim mode implements
u(undo) and.(repeat last change) in NORMAL mode, but notCtrl+R(redo). The docs at code.claude.com/docs/en/interactive-mode confirm no redo command exists. - The keybinding system has a
chat:undoaction but nochat:redocounterpart, so redo can't be bound in~/.claude/keybindings.jsoneither.
One keystroke too many on u and your prompt edit is permanently gone. This is especially painful when composing long prompts, where undo/redo is muscle memory from every other editor.
Proposed Solution
- Add a
chat:redoaction to the keybinding system as the counterpart tochat:undo. - In vim mode, bind
Ctrl+Rin NORMAL mode to it, matching vim's standard behavior.
Implementation-wise this is the standard two-stack model: undo pops onto a redo stack, redo pops back, and any new edit clears the redo stack.
Conflict with history search
Ctrl+R currently opens reverse prompt-history search. The clean resolution is to scope by mode: keep Ctrl+R as history search in INSERT mode, and make it redo in NORMAL mode. This mirrors vim itself, where Ctrl+R only means redo in normal mode and has a different meaning in insert mode. Users who want a mode-independent redo can bind chat:redo to another key via keybindings.json.
Prior history
This has been requested repeatedly, but every incarnation was closed by automation rather than an actual decision:
- #29875 (original
chat:redorequest, went stale) - #44511 (reopened #29875, closed "not planned" by the inactivity bot)
- #58370 (auto-closed as duplicate of #44511, which was already closed)
- #63820 (auto-closed for inactivity)
Filing fresh since none of these reached a human verdict, and the closed issues are locked so they can no longer collect 👍.
Priority
Medium - Would be very helpful
Feature Category
Interactive mode (TUI)