我想展示自动完成面板,并且我使用API on_query_completions在sublime-text 3中成功,但是我使用相同的代码在sublime-text2中失败。
代码:
import sublime, sublime_plugin
class CCAutoComplete(sublime_plugin.EventListener):
def on_query_completions(self, view, prefix, locations):
flag = sublime.INHIBIT_WORD_COMPLETIONS | sublime.INHIBIT_EXPLICIT_COMPLETIONS
result = ([["abv","abv"],["abcd123","abcd"]],flag)
return result
答案 0 :(得分:0)
使用元组数组作为完成值而不是2D数组:
[("abv","abv"),("abcd123","abcd")]