Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the command to match brackets in Emacs?

What is the command to match brackets in Emacs (the equivalent of the % command in Vim)?

like image 399
Chris Huang-Leaver Avatar asked Nov 04 '08 10:11

Chris Huang-Leaver


People also ask

How do you match a bracket in Vim?

The % key. You can use the % key to jump to a matching opening or closing parenthesis, square bracket or a curly brace.

How do I match brackets in Eclipse?

To jump to the matching bracket, press Ctrl+Shift+P.


2 Answers

See show-paren-mode as described in 5.27 How do I show which parenthesis matches the one I'm looking at?

like image 160
Alexander Kojevnikov Avatar answered Oct 09 '22 04:10

Alexander Kojevnikov


C-M-f, or M-x forward-sexp, goes forward to the closing brace, or to the opening brace in the next set of braces. C-M-b, or M-x backward-sexp, goes backward to the opening brace, or to the closing brace in the next set of braces. These commands will work for parentheses, square brackets, curly braces, angle brackets, etc., and can be customized to recognize other delimiters.

like image 29
Chris Conway Avatar answered Oct 09 '22 03:10

Chris Conway