Sublime Forum

How to show pre-defined completions

#1

Can we use tmPreferences too or is it required to write a plugin?

0 Likes

#2

It has to be done via the API, something along the lines of:

from AutoComplete import AutoCompleteCommand

def sampleCompletions(view, pos, prefix, completions):
	return "xyzzy", "idkfa"] + completions

AutoCompleteCommand.completionCallbacks'sampleCompletions'] = sampleCompletions
0 Likes