Re:Codemirror v3 released
by gjtorikian on Monday December 10, 2012 @03:59PM
(#4901456)
Developer for Ace here.
The syntax highlighting rules for Ace were largely derived from tmlanguage files. This allows us to pretty easily import existing definitions. For example, Google had a tmlanguahe file for Dart that I was able to translate in less than an hour.
Could you describe more about what you like about CM's highlight rules? I admit I've never really looked into them. But I'm guessing by "show local variables in a different color" there's some parsing going on?
> CodeMirror is being seriously considered independently in WebKit's and Firefox' DevTools, built-in.
Whoa, can you cite sources for these?
A great difference, in my opinion, is the syntax highlighting systems. Ace's is more rule-based (as in, regex matches and regions), while CodeMirror's is more programmatic, which helps its JS mode show local variables in a different color.
There are also differences in the data structures used internally, afaik. Marijn can probably talk more about that.
On a different note, CodeMirror is being seriously considered independently in WebKit's and Firefox' DevTools, built-in. You may soon use it every day without even knowing!