I implemented a Autocompletion plugin for SublimeText
import sublime_plugin
import sublime
tensorflow_functions = ["tf.AggregationMethod()","tf.Assert()","tf.AttrValue()","tf.AttrValue.ListValue()", etc...]
class TensorflowAutocomplete(sublime_plugin.EventListener):
def __init__(self):
self.tf_completions = [("%s \tTensorflow" % s, s) for s in tensorflow_functions]
def on_query_completions(self, view, prefix, locations):
if view.match_selector(locations[0], 'source.python'):
return self.tf_completions
else:
return[]
Is there any ways I can move the cursor into the parenthesis when the user selected an item in the autocompletion list? I didn't tried anything because I can't find what I want in the API documentation.