Skip to content
This repository

Emacs rainbow delimiters mode

branch: master

Flush the ppss cache on mode activation.

This prevents the code from relying on stale cache if the mode
has been deactivated, the buffer changed and the mode activated again.
latest commit 2f17e9d735
Fanael authored
Octocat-spinner-32 .gitignore Ignoring compiled files
Octocat-spinner-32 README.markdown README.markdown: minor wording changes.
Octocat-spinner-32 rainbow-delimiters.el Flush the ppss cache on mode activation.


Rainbow Delimiters is a “rainbow parentheses”-like mode which highlights parentheses, brackets, and braces according to their depth. Each successive level is highlighted in a different color. This makes it easy to spot matching delimiters, orient yourself in the code, and tell which statements are at a given depth.

Great care has been taken to make this mode fast. You shouldn’t see any change in scrolling or editing speed when it's on even when working in delimiter-rich languages like Clojure or Emacs Lisp. It can be used with any language, and can be enabled editor-wide.

You can customize the colors rainbow-delimiters uses. The default colors are intentionally subtle; they are unobtrusive enough to make the mode worth looking at even if you usually don’t like rainbow parentheses modes. A number of major color themes such as Zenburn and Solarized have added their own faces for the mode.

This is the official github repository for rainbow-delimiters.

The latest release of rainbow-delimiters.el is always found here:

Further information is available on the EmacsWiki page:

Installation instructions:

  1. Place rainbow-delimiters.el on your emacs load-path.

  2. Compile the file (necessary for speed):
    M-x byte-compile-file [location of rainbow-delimiters.el]

  3. Add the following to your dot-emacs/init file:
    (require 'rainbow-delimiters)
  4. Activate the mode in your init file.
    You can choose to enable it only for specific modes, or Emacs-wide:

  • To enable it only in certain modes, add lines like the following:
    (add-hook 'clojure-mode-hook 'rainbow-delimiters-mode)

  • To enable it in all programming-related emacs modes (Emacs 24+):
    (add-hook 'prog-mode-hook 'rainbow-delimiters-mode)

  • To activate the mode globally, add to your init file:

  • To temporarily activate rainbow-delimiters mode in an open buffer:
    M-x rainbow-delimiters-mode

Additional discussion is at the top of the file and on the EmacsWiki page linked to above.

Something went wrong with that request. Please try again.