Which command matches brackets in Emacs?

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

+42
linux editor gnu emacs
Nov 04 '08 at 10:59
source share
5 answers
+49
Nov 04 '08 at 11:10
source share

CMf or Mx forward-sexp , goes forward to the closing curly brace or to the opening brace in the next set of curly braces. CMb or Mx backward-sexp , goes back to the opening bracket or to the closing bracket in the next set of curly braces. These commands will work in parentheses, square brackets, curly brackets, angle brackets, etc. And can be configured to recognize other delimiters.

+33
Nov 04 '08 at 12:22
source share

Just to complete the last answer. I use CMn for direct match and CMu for backward match. CM displayed on Esc + Ctrl on Windows keyboards.

+10
May 16 '11 at 8:11
source share

There is also show-paren-mode . For navigation, I think CMn and CMn

+2
Nov 09 '08 at 6:20
source share

https://github.com/redguardtoo/evil-matchit

I read the vim matchit code before starting an evil match. evil-matchit offers much more than the original vim matchit.

In addition, you can easily extend evil-matchit to support any new languages ​​in your own ~ / .emacs.

+1
Jul 14 '14 at 7:30
source share



All Articles