def global_tick(): Listener.push() if G.AGENT and G.AGENT.sock: G.AGENT.select() utils.set_timeout(global_tick, G.TICK_TIME)
# TODO: this scrolling is lame and centers text :/ self.view.show(size) def is_visible(self): return False def is_enabled(self): return True def description(self): return # The new ST3 plugin API sucks class FlooViewReplaceRegion(sublime_plugin.TextCommand): def run(self, edit, r, data, *args, **kwargs): region = sublime.Region(int(r[0]), int(r[1])) self.view.replace(edit, region, data) def is_visible(self): return False def is_enabled(self): return True def description(self): return Listener.push()
def is_enabled(self): return bool(agent and agent.is_ready() and not G.FOLLOW_MODE) class FloobitsDisableFollowModeCommand(FloobitsBaseCommand): def run(self): G.FOLLOW_MODE = False def is_visible(self): return bool(self.is_enabled()) def is_enabled(self): return bool(agent and agent.is_ready() and G.FOLLOW_MODE) class FloobitsNotACommand(sublime_plugin.WindowCommand): def run(self, *args, **kwargs): pass def is_visible(self): return True def is_enabled(self): return False def description(self): return Listener.push()