AI News DailyTips한국어
← AI tool tips
Claude Code✓ Confirmed in official docsAdded Oct 16

How to jump to and delete up to the matching bracket with % in Claude Code vim mode

If you use vim mode in the Claude Code prompt, version 2.1.301, released October 15, adds % to jump to the matching bracket. Use it to delete or change a whole bracketed chunk, such as JSON or a function call you pasted into the prompt.

  1. Turn on vim mode. Pick Editor mode in /config, or set it in ~/.claude/settings.json.
{
  "editorMode": "vim"
}
  1. Press Esc to enter NORMAL mode, put the cursor on a bracket, and use these keys.
%    jump to the matching bracket
d%   delete up to the matching bracket
c%   delete up to the matching bracket and enter INSERT mode
y%   yank up to the matching bracket

From the same version, the free-text answer field shown when Claude asks with AskUserQuestion also supports vim NORMAL mode. There, Esc only switches to NORMAL mode; to discard your answer and cancel, press Esc again from NORMAL mode.

Get notified when a new tip lands

Tip alerts only go out in the app. Install it and turn notifications on.

Get the app

All tips →