I'm going to be looking very carefully at Bespin, Ace, CodeMirror and Ymacs. Not sure which, if any, pieces I'll be able to reuse... especially since I'm hoping to move to webGL where appropriate. But I am not going to blindly rewrite pieces that need no such effort.