Auto complete itself is now implemented via a plugin, and you can choose to either hook into that, or show a separate completions menu (via the new method view.showCompletions).
A short example of hooking into the existing auto complete command:
- Code: Select all
from AutoComplete import AutoCompleteCommand
def AddGreeting(view, pos, prefix, completions):
return ["Hello!"] + completions
AutoCompleteCommand.completionCallbacks['AddGreeting'] = AddGreeting
This will add "Hello!" as the first available auto complete suggestion.