I\'m working on trying to add a custom autocomplete, that I want to trigger whenever the user is typing (configurable of course). I\'ve found a couple examples of autocomple
changed Oleksandr Pshenychnyy's answer a little bit(see here), Answering as I can't add comments yet
The code below only allows autocomplete to come up when a letter key is pressed (probably what you want instead on any key)
editor.on("keyup", function (cm, event) {
if (!cm.state.completionActive && /*Enables keyboard navigation in autocomplete list*/
event.keyCode > 64 && event.keyCode < 91){// only when a letter key is pressed
CodeMirror.commands.autocomplete(cm, null, {completeSingle: false});
}
});
(this should work logically, but could some please comment if this works or not !)