WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

How to enable Autocomplete in the Ace editor

Harutyun Amirjanyan edited this page Nov 3, 2013 · 4 revisions

In brief:

ace.require("ace/ext/language_tools");
var editor = ace.edit("editor");
editor.setOptions({
    enableBasicAutocompletion: true
});

Depending on your setup with require-js, you may also need to include an additional javascript file in the html for your page:

<script src="ace/ext-language_tools.js"></script>

You can find a demo at https://github.com/ajaxorg/ace/blob/master/demo/autocompletion.html

When setting enableBasicAutocompletion to true then the keyword and snippet completer as well as the text completer are used.

Here is an example for implementing a new completer: http://plnkr.co/edit/6MVntVmXYUbjR0DI82Cr?p=preview

Clone this wiki locally