import sublime
import sublime_plugin
class MaxPaneEvents(sublime_plugin.EventListener):
def on_selection_modified(self, view):
print( 'I am on_selection_modified...', view.id() )
class TestCommand(sublime_plugin.TextCommand):
def run(self, edit, index):
view = self.view
print( 'I am on_selection_modified...', view.id() )
point = index * 3
view.sel().add(sublime.Region(point, point))
def delayed_restore(index):
index -= 1
print('index', index)
active_view = sublime.active_window().active_view()
active_view.run_command("test", {"index": index})
if index > 30:
sublime.set_timeout(lambda: delayed_restore(index), 1000)
# sublime.set_timeout(lambda: delayed_restore(40), 1000)
Created
August 11, 2019 05:09
-
-
Save evandrocoan/c1aa0cd4547e11f96a8dd428de3d3235 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment