feature(edit) add autocomletion

This commit is contained in:
coderaiser 2014-01-03 15:10:11 +00:00
parent fbbd741c87
commit 7b42fc260c

View file

@ -57,9 +57,6 @@ var CloudCmd, Util, DOM, CloudFunc, ace, DiffProto, diff_match_patch;
initAce();
}
if (!Modelist)
Modelist = ace.require('ace/ext/modelist');
if (isDir)
lMode = Modelist.modesByName.json.mode;
else
@ -151,6 +148,14 @@ var CloudCmd, Util, DOM, CloudFunc, ace, DiffProto, diff_match_patch;
bindKey : { win: 'Ctrl-S', mac: 'Command-S' },
exec : save
});
ace.require('ace/ext/language_tools');
Modelist = ace.require('ace/ext/modelist');
Ace.setOptions({
enableBasicAutocompletion : true,
enableSnippets : true
});
}
function save () {