Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephane committed Feb 25, 2014
0 parents commit c701499
Show file tree
Hide file tree
Showing 6 changed files with 467 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -0,0 +1 @@
*.elc
42 changes: 42 additions & 0 deletions README.markdown
@@ -0,0 +1,42 @@
rainbow-blocks: Groking Lisp languages through block highlighting.
======================


Rainbow Blocks is an Emacs mode that highlights code blocks in lisp languages
to help quickly mentally parse its structure.
It is a fork from the brilliant
[rainbow-delimiters.el](http://github.com/jlr/rainbow-delimiters) 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 parse syntax nor understands language scope.

### Emacs Lisp example

##### rainbow delimiters
![](elisp-delims.png)
##### rainbow blocks
![](elisp-blocks.png)


### Installation

* Install via melpa:
```M-x package-install RET rainbow-blocks RED```

* 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)```


### Further reading

- Daniel's Lamb's [implementation for JavaScript](https://github.com/daniellmb/JavaScript-Scope-Context-Coloring)
- [Evan Brooks' article](https://medium.com/p/3a6db2743a1e/))
Binary file added elisp-blocks.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added elisp-delims.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added elisp-none.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c701499

Please sign in to comment.