Skip to content Skip to sidebar Skip to footer

Save The Edit When Running A Sublime Text 3 Plugin

For understanding what I'm trying to achieve : printing delayed text in another view... I'm trying to make this sublime text 3 plugin run properly I want to call multiple method o

Solution 1:

Solution found, to pass an argument to another view and use the edit :

class MainCommand(sublime_plugin.WindowCommand):
    def run(self):
        newFile = self.window.new_file()
        newFile.run_command("second",{ "arg" : "this is an argument"});

class SecondCommand(sublime_plugin.TextCommand):
    def run(self, edit, argument):
        # do stuff with argument

Post a Comment for "Save The Edit When Running A Sublime Text 3 Plugin"