diff --git a/Makefile.dryice.js b/Makefile.dryice.js index 6ed1dd70..d92c938e 100644 --- a/Makefile.dryice.js +++ b/Makefile.dryice.js @@ -44,7 +44,7 @@ var aceHome = __dirname; var pilot = copy.createDataObject(); copy({ source: [ { - root: aceHome + '/support/cockpit/support/pilot/lib', + root: aceHome + '/support/pilot/lib', include: /.*\.js$/, exclude: /tests?\// } ], diff --git a/Readme.md b/Readme.md index 161852a0..b4f633a5 100644 --- a/Readme.md +++ b/Readme.md @@ -1,6 +1,35 @@ -ACE (Ajax.org Cloud9 Editor) -========================== +Ace (Ajax.org Cloud9 Editor) +============================ -ACE is a standalone code editor written in JavaScript. It can be easily embedded in any web page and JavaScript application. It is developed as the editor component for the [Cloud9 IDE](http://cloud9ide.com). +Ace is a standalone code editor written in JavaScript. Our goal is to create a web based code editor that matches and extends the features, usability and performance of existing native editors such as TextMate, Vim or Eclipse. It can be easily embedded in any web page and JavaScript application. Ace is developed as the primary editor for [Cloud9 IDE](http://www.cloud9ide.com/) and the successor of the Mozilla Skywriter (Bespin) Project. -Checkout the [demo](http://ajaxorg.github.com/ace/editor-build.html)! +Features +-------- + +* Syntax highlighting +* Auto indentation and outdent +* An optional command line +* Work with huge documents (100,000 lines and more are no problem) +* Fully customizable key bindings including VI and Emacs modes +* Themes (TextMate themes can be imported) +* Search and replace with regular expressions +* Highlight matching parentheses +* Toggle between soft tabs and real tabs +* Displays hidden characters + +Take Ace for a spin! +-------------------- + +Check out the Ace live [demo](http://ajaxorg.github.com/ace/editor-build.html) or get a [Cloud9 IDE account](http://run.cloud9ide.com) to experience Ace while editing one of your own GitHub projects. + +History +------- + +Previously known as “Bespin” or lately “Skywriter” it’s now known as Ace (Ajax.org Cloud9 Editor)! Bespin and Ace started as two independent projects both aiming to build a no compromise code editor component for the web. Bespin started as part of Mozilla Labs and was based on the canvas tag, while Ace is the Editor component of the Cloud9 IDE and is using the DOM for rendering. After the release of Ace at JSConf.eu 2010 in Berlin the Skywriter team decided to merge Ace with a simplified version of Skywriter's plugin system and some of Skywriter's extensibility points. All these changes have been merged back to Ace now, which supersedes Skywriter. Both Ajax.org and Mozilla are actively developing and maintaining Ace. + +Getting the code +---------------- + +Ace is a community project. We actively encourage and support contributions. The Ace source code is hosted on GitHub. It is released under the Mozilla tri-license (MPL/GPL/LGPL). This is the same license used by Firefox. This license is friendly to all kinds of projects, whether open source or not. Take charge of your editor and add your favorite language highlighting and keybindings! + + git clone git://github.com/ajaxorg/ace.git \ No newline at end of file diff --git a/build_support/mini_require.js b/build_support/mini_require.js index 63bcf28b..9500fbc2 100644 --- a/build_support/mini_require.js +++ b/build_support/mini_require.js @@ -88,6 +88,6 @@ function define(module, payload) { return; } - console.log('defining module: ' + module + ' as a ' + typeof payload); + // console.log('defining module: ' + module + ' as a ' + typeof payload); require.modules[module] = payload; } diff --git a/lib/ace/document.js b/lib/ace/document.js index bb25eeb6..20250ba7 100644 --- a/lib/ace/document.js +++ b/lib/ace/document.js @@ -166,9 +166,8 @@ var Document = function(text) { position = this.$clipPosition(position); - if (this.$lines.length <= 1) { + if (this.getLength() <= 1) this.$detectNewLine(text); - } var newLines = this.$split(text); @@ -336,15 +335,13 @@ var Document = function(text) { }; this.replace = function(range, text) { - // Shortcut: Nothing to replace in this case. if (text.length == 0 && range.isEmpty()) return range.start; // Shortcut: If the text we want to insert is the same as it is already // in the document, we don't have to replace anything. - if (text == this.getTextRange(range)) { + if (text == this.getTextRange(range)) return range.end; - } this.remove(range); if (text) { diff --git a/support/cockpit b/support/cockpit index 82e2468e..dbc78536 160000 --- a/support/cockpit +++ b/support/cockpit @@ -1 +1 @@ -Subproject commit 82e2468eededd319c4a8062baf258f0f2d4f7c86 +Subproject commit dbc78536a4ea61e0f762067fb847213526500d9f diff --git a/support/pilot b/support/pilot index 250ffe66..f0ba9df0 160000 --- a/support/pilot +++ b/support/pilot @@ -1 +1 @@ -Subproject commit 250ffe66af17457c8d56660b57cdf7ae6cef73c3 +Subproject commit f0ba9df06853f733f5a0cd4d774facd1fc067c92