navigation

%

In normal mode, % jumps between matching pairs of (), [], {}, and (with matchit) HTML/XML tags. Indispensable for navigating nested code and confirming that a stray brace really does close where you think it does.

%  (normal / visual mode)

Variations

Keystroke Effect
d% Delete from opening bracket to matching close (or vice versa)
y% Yank the enclosed region including brackets
v% Visually select from bracket to its match
{ / } Related paragraph motion — jump to previous / next blank line

Examples

%

With cursor on {, jump to the matching }

d%

Delete an entire (…) expression including both parens

V%

Line-select an entire function body defined by { }

Gotcha

Cursor must be ON the bracket, not just near it. Note: % in :substitute means 'whole file' — same character, totally different meaning.

Related

← All Vim commands · Vim cheat sheet