def run(self, edit): global LEFT LEFT = {"win_id": self.view.window().id(), "view_id": self.view.id(), "clip": None} name = self.view.file_name() if name is None: name = "Untitled" update_menu(basename(name))
def basic_reload(): global LEFT LEFT = None update_menu() settings = load_settings() settings.clear_on_change('reload_basic') settings.add_on_change('reload_basic', basic_reload)
def run(self, edit, group=-1, index=-1): global LEFT if index != -1: # Ensure we have the correct view self.view = sublime.active_window().views_in_group(group)[index] LEFT = {"win_id": None, "view_id": None, "clip": EasyDiffView("**selection**", self.get_selections(), self.get_encoding())} update_menu("**selection**")
def on_close(self, view): """Update menu on view close.""" global LEFT vid = view.id() if LEFT is not None and vid == LEFT["view_id"]: LEFT = None update_menu()
def run(self, edit): global LEFT LEFT = { "win_id": None, "view_id": None, "clip": EasyDiffView("**clipboard**", sublime.get_clipboard(), "UTF-8") } update_menu("**clipboard**")
def run(self, paths=[], group=-1, index=-1): """Run command.""" global LEFT LEFT = { "win_id": None, "view_id": None, "clip": EasyDiffView("**clipboard**", sublime.get_clipboard(), "UTF-8") } update_menu("**clipboard**")
def run(self, paths=[], group=-1, index=-1): global LEFT self.set_view(paths, group, index) if self.view is None: return LEFT = {"win_id": self.view.window().id(), "view_id": self.view.id(), "clip": None} name = self.view.file_name() if name is None: name = "Untitled" update_menu(basename(name))
def run(self, edit): global LEFT LEFT = { "win_id": self.view.window().id(), "view_id": self.view.id(), "clip": None } name = self.view.file_name() if name is None: name = "Untitled" update_menu(basename(name))
def run(self, edit): global LEFT LEFT = { "win_id": None, "view_id": None, "clip": EasyDiffView("**selection**", self.get_selections(), self.get_encoding()) } update_menu("**selection**")
def run(self, edit, group=-1, index=-1): """Run command.""" global LEFT if index != -1: # Ensure we have the correct view self.view = get_group_view(sublime.active_window(), group, index) LEFT = { "win_id": None, "view_id": None, "clip": EasyDiffView("**selection**", self.get_selections(), self.get_encoding()) } update_menu("**selection**")
def run(self, paths=[], group=-1, index=-1): """Run command.""" global LEFT self.set_view(paths, group, index) if self.view is None: return LEFT = { "win_id": self.view.window().id(), "view_id": self.view.id(), "clip": None } name = self.view.file_name() if name is None: name = "Untitled" update_menu(basename(name))
def run(self, edit): global LEFT LEFT = {"win_id": None, "view_id": None, "clip": EasyDiffView("**selection**", self.get_selections(), self.get_encoding())} update_menu("**selection**")
def run(self, edit): global LEFT LEFT = {"win_id": None, "view_id": None, "clip": EasyDiffView("**clipboard**", sublime.get_clipboard(), "UTF-8")} update_menu("**clipboard**")