Mongo Map (this) with Tern
This demo shows in action the lint feature and a powerfull hint with Javascript by using
Tern
. If you press Ctrl+Space a hint panel show the code suggest. It uses 2 CodeMirror addons :
"Official CodeMirror" addon/tern/tern.js
is a CodeMirror addon to use Tern (completion about variables, methodes etc).
addon/hint/tern/tern-extension.js
extends the CodeMirror Tern addon to display/insert signature functions.
addon/hint/javascript/javascript-templates.js
is a CodeMirror addon to manage javascript (Eclipse like) templates completions (snippets).
{"_id":{"$oid":"50d8fdedadd222278ba9090f"}, "astring" : "xxxx", "adate" : {"$date":"2012-12-25T01:14:21.312Z"}, "anumber" : 1, "aboolean" : true, "anarray" : [{"item":1}, {"item2":"ee"}]}
function() { var a = []; a. this.// Ctrl+Space }