[FEATURE] Add Visual Mode support to Vim mode (v, V, Ctrl+V)
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
Claude Code's vim mode currently supports Normal and Insert modes, along with an expanding set of motions and operators (d, c, y, text objects, f/t, ;/,, etc.). However, Visual mode (v for characterwise, V for linewise, and Ctrl+V for blockwise) is still missing.
For vim users, Visual mode is a fundamental editing primitive. It allows selecting arbitrary ranges of text and then operating on them — deleting, yanking, changing, indenting, or replacing. Without it, many common editing workflows require awkward workarounds (counting words/characters to construct the right motion) rather than the natural "select then act" pattern that Visual mode provides.
This is especially painful when editing longer, multi-line prompts where you need to restructure or remove a section that doesn't align neatly with a single text object or motion.
Proposed Solution
Implement Visual mode in the vim input editor with the following scope:
Visual Characterwise (v)
- Enter with
vfrom Normal mode - Extend selection using all existing motions (
h,j,k,l,w,b,e,0,$,gg,G,f,t, etc.) - Apply operators on selection:
d(delete),y(yank),c(change),>/<(indent),~(swap case),r(replace all selected chars) - Exit with
Escorvto return to Normal mode
Visual Linewise (V)
- Enter with
Vfrom Normal mode - Selection always extends to full lines
- Same operators as characterwise
Visual Blockwise (Ctrl+V) — nice to have
- Enter with
Ctrl+Vfrom Normal mode - Rectangular block selection
- Lower priority — characterwise and linewise cover the majority of use cases
Additional behaviors
gv— reselect the previous visual selectiono— jump to the other end of the selection while in Visual mode- Visual selection should be highlighted/styled distinctly in the input area
Alternative Solutions
_No response_
Priority
High - Significant impact on productivity
Feature Category
CLI commands and flags
Use Case Example
Restructuring a multi-line prompt:
You've written a 5-line prompt and want to move the 2nd and 3rd lines to the end. With Visual mode: jVjd → Gp. Without it: you need to count lines, use 2dd, navigate, and paste — or fall back to the mouse.
Replacing a phrase:
You want to replace a specific phrase mid-prompt. With Visual mode: v → navigate to end of phrase → c → type replacement. Without it: you need to figure out the exact motion/text-object that covers the phrase, which isn't always possible in one shot.
Deleting a block of text:
Select from cursor to a specific character with vf)d or to a search match. Much more intuitive than constructing the equivalent d motion when the target doesn't map cleanly to a single text object.
Additional Context
- Visual mode was previously requested in #2442 (closed with
autoclosetag) - The recent additions of yank/paste (
y,yy,p,P) and text objects make this the natural next step — Visual mode is the missing piece that ties these operators together into full vim fluency - Claude Code's vim mode has been steadily improving and this would bring it much closer to feature parity with other vim emulations (VS Code Vim, IdeaVim, etc.)
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗