Is Crockford contextual coloring used in any code editor?

I watched a video from YUIConf 2012 in which Douglas Crockford talks about implementing monads in JavaScript. In this conversation, he gives an example of code that uses what he calls β€œContextual Coloring,” which throws out the idea of ​​coloring by language syntax and introduces different colors for different levels of coverage. Here is a link to this part of the video.

http://www.youtube.com/watch?feature=player_embedded&v=dkZFtimgAcM#t=15m58s

Is this contextual coloring scheme implemented by any code editor for JavaScript or any language?

I use Sublime Text and this editor, like any other code editor I came across, allows you to apply color to the syntax. I'm not sure if the plugin can solve this problem or if the editor should be designed from scratch to allow this context coloring scheme.

+65
javascript editor sublimetext2 syntax-highlighting
Dec 14
source share
6 answers

As of February 13, 2013, Crockford added a coloring feature to the experimental context in JSLint.

https://plus.google.com/118095276221607585885/posts/FzKnHk96m2C

+9
Mar 15 '13 at 14:16
source share

I just watched his video for this, great stuff. If you give it a try or test the project on GitHub https://github.com/daniellmb/JavaScript-Scope-Context-Coloring .

JavaScript Scope Context Coloring

+23
Apr 6 '13 at 0:31
source share

Now there is a package for the sublime: https://github.com/mazurov/sublime-levels

It also has an online demo at http://mazurov.imtqy.com/eslevels-demo/

+8
Jul 13 '13 at 16:51
source share

Vim (GitHub) :

enter image description here

Emacs (GitHub) :

Screenshot of context coloring in Emacs.

+8
Feb 13 '14 at 6:35
source share

BlueJ has this (1) - but then it also may not be. Contextual coloring for a region in javascript will certainly be more complex than any other language, such as java, which this editor runs on.

Brackets are likely to do this in the end, as they worship Crockford (2,3)

Why don't you join them to help write, or at least tell them?

Sources:

1) http://blogs.kent.ac.uk/mik/2010/05/bluej-3-0-whats-new/

2) https://github.com/adobe/brackets/issues/search?q=Crockford

3) http://www.adobe.com/devnet/html5/articles/bracket-code-architecture.html

+3
Jan 18 '13 at 17:16
source share

Not that I knew. That would be great, but it would require a JavaScript-specific lexical analyzer, and it probably wouldn't work if there were any syntax errors.

-one
Dec 19
source share



All Articles