Shortcut

Vim Move to the Matching Bracket Shortcut

The Vim shortcut to move to the matching bracket is % on Windows. It's the same on Mac.

Quick Answer

Windows
%
Mac
%
Web
Not confirmed yet
VimShortcut

Move to the Matching Bracket

Windows
%

Jumps between a bracket, brace, comment or #if and its pair.

Learn More

How to move to the matching bracket in Vim

  1. Open Vim and go to where you want to move to the matching bracket.
  2. Press % on Windows or % on Mac.

Vim Move to the Matching Bracket Shortcut for Windows

Press %.

Vim Move to the Matching Bracket Shortcut for Mac

Press %.

Vim Move to the Matching Bracket Shortcut for Vim Web

We haven't confirmed a Vim Web shortcut for this yet.

Related Keyboard Shortcuts

Frequently asked questions

What is the Vim move to the matching bracket shortcut?

On Windows, press %. On a Mac, press %.

Is there a Mac shortcut to move to the matching bracket in Vim?

Yes: %.

Does it work in Vim for the web?

We haven't confirmed a web version shortcut for this yet.

Official source · How we verify