M-x all-things-emacs

Quick Tip: show-paren-mode

August 7th, 2007 by Rob Christie · 8 Comments

When show-paren-mode is enabled a matching parenthesis is highlighted based on the location of point (i.e., when your cursor is on a parenthesis). show-paren-mode Example
You can tweak the behaviour of this minor mode by adjusting show-paren-style and the show-paren-delay. There are three styles to choose from:

  • parenthesis – shows the matching paren
  • expression – shows the entire expression enclosed by the paren, and
  • mixed – shows the matching paren if it is visible, and the expression otherwise.

To obtain this behaviour, add the following to your .emacs file:

(show-paren-mode t)

Tags: newbie · quick · tips

8 responses so far ↓

  • 1 Eric // Aug 8, 2007 at 9:44 am

    Again, thanks for pointing out a simple but incredibly useful feature. I have been using paren matching for a very long time but had never investigated the options available. Being able to highlight the expression and not just the parentheses themselves is a very useful feature.

  • 2 pqs // Oct 5, 2009 at 1:47 pm

    This should be activated by default!

  • 3 seo // Jul 25, 2015 at 8:00 pm

    ... [Trackback]

    [...] There you will find 71203 more Infos: emacsblog.org/2007/08/07/quick-tip-show-paren-mode/ [...]

  • 4 culinary matcha // Aug 19, 2015 at 6:56 am

    ... [Trackback]

    [...] There you will find 88113 more Infos: emacsblog.org/2007/08/07/quick-tip-show-paren-mode/ [...]

  • 5 buy backlinks // Aug 20, 2015 at 5:55 pm

    ... [Trackback]

    [...] There you will find 32763 more Infos: emacsblog.org/2007/08/07/quick-tip-show-paren-mode/ [...]

  • 6 where to buy backlinks // Aug 21, 2015 at 10:41 pm

    ... [Trackback]

    [...] Read More Infos here: emacsblog.org/2007/08/07/quick-tip-show-paren-mode/ [...]

  • 7 matcha green tea // Aug 23, 2015 at 6:33 am

    ... [Trackback]

    [...] There you will find 77605 more Infos: emacsblog.org/2007/08/07/quick-tip-show-paren-mode/ [...]

  • 8 Green tea powder // Aug 24, 2015 at 4:13 am

    ... [Trackback]

    [...] Read More: emacsblog.org/2007/08/07/quick-tip-show-paren-mode/ [...]