Thursday, August 9, 2007

Quick Tip: show-paren-mode

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)

No comments: