News for hackers. Stuff that matters.
Re:Codemirror v3 released by espadrine on Monday December 10, 2012 @02:05PM (#4900894)
CodeMirror and Ace both have a long history of sane competition, and copied many of the ideas from one another. So much, in fact, that whenever I find myself in front of an Ace editor, I open up the DevTools and change the CSS to make the cursor 1 pixel wide. They have pretty much the same cursor display system!

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!

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?

Re:Codemirror v3 released by kibwen on Monday December 10, 2012 @03:53PM (#4901428)

  > CodeMirror is being seriously considered independently in WebKit's and Firefox' DevTools, built-in.
Whoa, can you cite sources for these?
Re:Codemirror v3 released by kibwen on Monday December 10, 2012 @04:49PM (#4901706)
Wow, so it's already landed in Webkit, presumably behind some experimental flag. This is really neat, thanks.