user1189851
user1189851

Reputation: 5041

matching opening and closing braces in emacs

I am a newbie to emacs and have been using it only for a month.
My queries are:

  1. I want to track the matching opening and closing braces in the editor. Is there a command for this?

  2. When trying to use emacs using cygwin in Windows, C-x C-c to close emacs does not work! Is there a way I can get this to work?

Upvotes: 2

Views: 535

Answers (2)

Trey Jackson
Trey Jackson

Reputation: 74420

I personally like mic-paren, which has many options for customizing how to show matching parentheses, including showing you the line of the matching paren in the minibuffer when it is off-screen.

I set it up as follows:

(setq paren-dont-touch-blink t)
(require 'mic-paren)
(paren-activate)
(setq paren-match-face 'highlight)
(setq paren-sexp-mode t)

Upvotes: 2

Tyler
Tyler

Reputation: 10032

show-paren-mode will highlight matching parentheses, at least when the cursor is on one or the other.

A more powerful alternative is highlight parentheses mode. This will highlight all the parentheses around point (the cursor), so you see the scope of all the enclosing parentheses as you navigate your code.

There are other options as well, listed on the wiki.

Upvotes: 1

Related Questions