def init_completion(self): provider = self.completion_provider if not hasattr(self.editor.buffer, 'python_completion_added'): add_completion_provider(self.editor.buffer, provider, 100) self.editor.buffer.python_completion_added = True attach_completer(self.editor.view)
def editor_opened(editor): if hasattr(editor.buffer, 'snippet_contexts'): editor.view.connect('key-press-event', on_view_key_press_event, editor.buffer.snippet_contexts, weakref.ref(editor)) attach_completer(editor.view)