What is the command to match brackets in Emacs?

后端 未结 5 1540
盖世英雄少女心
盖世英雄少女心 2020-12-12 20:55

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

相关标签:
5条回答
  • 2020-12-12 21:15

    There is also a show-paren-mode. For navigation, I think it's better C-M-n and C-M-n

    0 讨论(0)
  • 2020-12-12 21:16

    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.

    0 讨论(0)
  • 2020-12-12 21:20

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

    0 讨论(0)
  • 2020-12-12 21:23

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

    I read vim matchit code before developing evil-matchit. evil-matchit is offering much more than original vim matchit now.

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

    0 讨论(0)
  • 2020-12-12 21:27

    Just to complete the last response. I use C-M-n for forward match and C-M-u for backward match. C-M maps to Esc+Ctrl on windows keyboards.

    0 讨论(0)
提交回复
热议问题