Save the edit when running a Sublime Text 3 plugin

后端 未结 1 1874
闹比i
闹比i 2021-02-14 20:29

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 mult

相关标签:
1条回答
  • 2021-02-14 21:03

    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
    
    0 讨论(0)
提交回复
热议问题