I created a plugin for sublime text 3with three commands: 2 of them are of type TextCommand, one of themWindowCommand
import sublime, sublime_plugin
class simple_text_pluginCommand(sublime_plugin.TextCommand):
def run(self, edit):
print("Hello World simple_text_plugin")
class simple_text_plugin2Command(sublime_plugin.TextCommand):
def run(self, edit):
print("Hello World simple_text_plugin2")
class simple_window_pluginCommand(sublime_plugin.WindowCommand):
def run(self):
print("Hello World simple_window_plugin")
Why can I only call sublime command line(ctrl + `) only text commands:
>>> view.run_command('simple_text_plugin')
Hello World simple_text_plugin
>>> view.run_command('simple_text_plugin2')
Hello World simple_text_plugin2
But cannot call the command window:
>>> view.run_command('simple_window_plugin')
There is no way out. How to run a type plugin windowfrom sublime console?
source
share