Skip to content


Subversion checkout URL

You can clone with
Download ZIP
block syntax highlighting in emacs
Emacs Lisp
Branch: master
Failed to load latest commit information.
.gitignore first commit
README.markdown just one screenshot
elisp-blocks.png first commit
rainbow-blocks.el reset mode cleanly


rainbow-blocks: Groking Lisp languages through block highlighting.

Rainbow-blocks is an Emacs mode that highlights blocks made of parentheses, brackets, and braces according to their depth. Each successive level is highlighted in a different color. This makes it easy to orient yourself in the code, and tell which statements are at a given level.

It is a fork from the brilliant rainbow-delimiters.el package, and only applies minor patches.

It is inspired by Douglas Crockford's remark that highlighting scope rather that syntax is sometimes more useful. So far, however, it does not understand the actual scope constructs of the given language.

Emacs Lisp example


  • Install via melpa: M-x package-install RET rainbow-blocks RET

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

  • Add the following to your dot-emacs/init file: (require 'rainbow-blocks)

  • Activate the mode in your init file (e.g. for clojure): (add-hook 'clojure-mode-hook 'rainbow-blocks-mode)

  • It is also often useful to temporarily enable the mode by just calling: M-x rainbow-blocks-mode

Further reading

Something went wrong with that request. Please try again.