I wrote this little plugin to repeat macros. I guess I should move this over to the plugin development forum.
Only issue is that, while it works, it is really very slow for any large number of repetitions, and it locks up Sublime while it is running. Haven’t really explored how else to make it happen. I am a neophyte python programmer, and just downloaded/purchased Sublime a few days ago.
import sublime, sublime_plugin
class repeat_macro(sublime_plugin.WindowCommand):
def run(self):
self.window.show_input_panel("Repeat Macro Count:",
"", self.on_done, None, None)
pass
def on_done(self, text):
try:
loopcount = int(text)
if self.window.active_view():
for x in xrange(1,loopcount):
for cmds in sublime.get_macro():
self.window.active_view().run_command(
cmds'command'], cmds'args'])
pass
except ValueError:
pass