In a sublime plugin we define a subclass of a Command class, or better a “command sub-class”, when we want to define a command or function using the sublime API, for example when we want to use the view methods
- sublime_plugin.TextCommand
- sublime_plugin.WindowCommand
- Sublime Text - ‘sublime_plugin.ApplicationCommand’ Class
The differences between the two is only when they are defined in the “timeline”:
- The
sublime_plugin.TextCommandclasses are instantiated once per view. The View object may be retrieved viaself.view - The
sublime_plugin.WindowCommandclasses are instantiated once per window. The Window object may be retrieved viaself.window - The
sublime_plugin.ApplicationCommandclasses.