Code autocomplete is probably one of the exciting features of a programmer’s text editor. Ever since Eclipse Orion started to demonstrate its wonderful Content Assist feature last summer, I do believe that an online, web-based editing component should always provide a minimalistic and convenient autocompletion. Fortunately, this is rather easy to achieve these days, thanks to Orion and Scripted.
For the autocompletion itself, Scripted’s Content Assist is employed. As I have written before, it has a well-developed type inferencer. Using a simple static code analysis, it can detect the possible matches on a best-effort basis. In addition to that, JSDoc-style of type annotation is also supported.
You can enjoy the working example at esprima.org/demo/autocomplete.html. Have fun!