I have just started using Codemirror in a project and it is superb, and easy to use with an excellent API. And thank you thank you thank you for not requiring me to use jQuery to interact with it!
Looking forward to using the inline widgets, those will be very useful.
Codemirror is fantastic. If (like me) you used to think that in-browser code editing/debugging was doomed to fail, look at CodeMirror. It just works, and is comparable to Scintilla; one less reason to do native apps.
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!
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?
As Marijn himself said ACE ≈ furniture CodeMirror ≈ timber [1].
Ace is more optimized for code -- multiple selections, indent guides, better folding.
Codemirror is smaller, and have better support for non english text (variable size and bidirectional). Also new features added in v3 -- lines with variable height, arbitrary widgets inside code, are quite impressive.
> I agree that CodeMirrors general infrastructure for folding is more powerful than ACE's. But CodeMirror still lacks fold buttons on the gutter.
The folding utility in the distribution does lack them. But adding them (as in the 2.x code folder) is, again, just a few lines of code -- there's support for showing gutter widgets in the core, and the only reason the folding utility doesn't use that that I felt they didn't add much.
Great stuff. This is also the editor that is used in Light Table. I also use it in my pastebin. I evaluated ace for this purpose, but it turned out to be much more of a pain to use, though I can't remember the specifics of why. 4Clojure previously used Ace, but we switched to codemirror a while back.
Looking forward to using the inline widgets, those will be very useful.