code: function(cm) {
    if (CodeMirror.snippets(cm) === CodeMirror.Pass) {
      return CodeMirror.simpleHint(cm, CodeMirror.hint.javascript);
    }
  }
docs: Save a reference to this autocomplete function to use it when Tern scripts are loaded but not used, since they will automatically overwrite the CodeMirror autocomplete function with CodeMirror.showHint