Re:JavaScript Scope Context Coloring
by scjr on Sunday April 07, 2013 @01:35AM
(#5506220)
It might be better to use variations in the background color. It may feel more natural to do so and it would allow normal syntax highlighting alongside scope highlighting.
Re:JavaScript Scope Context Coloring
by archangel_one on Sunday April 07, 2013 @03:52AM
(#5506454)
I was just thinking the same; when all my syntax highlighting in a region looks backwards, I normally assume I've got a mismatched quote just before it. I think I'd be thinking that with this all the time.
Subtle changes in the background colour would be a nice alternative.
Re:JavaScript Scope Context Coloring
by Zecc on Sunday April 07, 2013 @12:21PM
(#5507654)
Make the background color become less contrasting with the foreground color the more you nest.
The larger the number of nested scopes, the harder it's going to be to read it anyway!
Re:JavaScript Scope Context Coloring
by riffraff on Sunday April 07, 2013 @08:09AM
(#5506923)
how would an example of javascript without implicit global variables work?
For example, how does it get access to "Array", "require" or "window" ?
(I don't think "use strict" goes to the length of turning javascript into bracha's newspeak but I may likely have no idea what "strict javascript" actually refer to)
Re:JavaScript Scope Context Coloring
by dag11 on Sunday April 07, 2013 @01:34AM
(#5506214)
This is great.
Idea: Implement loose "syntax" highlighting over the scope highlighting by bolding syntax keywords instead of highlighting them. Perhaps also slightly change the brightness of certain syntax keywords.
Re:JavaScript Scope Context Coloring
by crazygringo on Sunday April 07, 2013 @12:08PM
(#5507613)
Great idea. Bolding language-specific words, and then making strings and comments less bright, would probably achieve 90% of the usefulness of normal syntax highlighting, and combine well with this.
Re:JavaScript Scope Context Coloring
by VeejayRampay on Sunday April 07, 2013 @10:28PM
(#5509688)
That's excellent. A nice variation around this that I've been keen on for a long time and have been wanting to see in modern IDEs is using 3D (or drop shadows) to simulate the nesting of blocks/closures/scopes and give the programmer an instant understanding of the different levels and depths.
Re:JavaScript Scope Context Coloring
by TheFuntastic on Sunday April 07, 2013 @03:57AM
(#5506466)
Can anyone point to which particular crockford talk this was inspired by? I've had the idea for scope highlighting bashing around my head for a while now, would love to know more.
Re:JavaScript Scope Context Coloring
by jtreminio on Sunday April 07, 2013 @12:14PM
(#5507628)
PhpStorm has this ability - and I've turned it off.
Too much colors for my blood, and it doesn't look good against Solarized.
One thing I really enjoy about this IDE is the indentation level markers - basically lines draw down to show you where the current scope ends (braces, parens).
Subtle changes in the background colour would be a nice alternative.
I'm actually serious by the way.
http://stackoverflow.com/questions/235360/what-is-the-scope-...
(I don't think "use strict" goes to the length of turning javascript into bracha's newspeak but I may likely have no idea what "strict javascript" actually refer to)
Idea: Implement loose "syntax" highlighting over the scope highlighting by bolding syntax keywords instead of highlighting them. Perhaps also slightly change the brightness of certain syntax keywords.
https://news.ycombinator.com/item?id=5095837
I think it would be great if they added it to JS, with their powerful syntax parsing it would be probably trivial to do.
Edit: probably works in their php, django and rails ide-s.
Too much colors for my blood, and it doesn't look good against Solarized.
One thing I really enjoy about this IDE is the indentation level markers - basically lines draw down to show you where the current scope ends (braces, parens).
Maybe not so useful...