Highlight the matching content of a pair of braces in emacs

Solution 1:

(show-paren-mode t)
(setq show-paren-style 'expression)

Emacs manual on show-paren-mode, however it does not mention show-paren-style. This emacs-fu blog post does.

Solution 2:

The package 'mic-paren' does this, along with telling you where the matching paren is if it's not visible. Check it out here.

This is my preferred setup:

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

Which does highlight the text between parens.

Solution 3:

Are you thinking about hl-sexp mode.? I only use it for elisp mode. Never coded cpp.

enter image description here