def expand_with_abbreviation(self, window): self.set_context(window) self.save_selection() done, self.last_expand = zen_dialog.main( self, window, self.do_expand_with_abbreviation, self.last_expand) if done: self.start_edit()
def wrap_with_abbreviation(self): zen_core.set_caret_placeholder(self.placeholder) self.save_selection() done, self.last_wrap = zen_dialog.main(self, self.window, self.callback_wrap_with_abbreviation, self.last_wrap, True) if done and not self.snippet_document[self.view]: self.start_edit() zen_core.set_caret_placeholder('')
def lorem_ipsum(self): self.save_selection() done, self.last_lorem_ipsum = zen_dialog.main(self, self.window, self.callback_lorem_ipsum, self.last_lorem_ipsum, False)
def prompt(self, title): done, result = zen_dialog.main(self, self.window, None, title) if done: return result return ''
def wrap_with_abbreviation(self, window): self.set_context(window) self.save_selection() done, self.last_wrap = zen_dialog.main(self, window, self.do_wrap_with_abbreviation, self.last_wrap) if done: self.start_edit()