sublime_plugin.TextCommand

ST2 TextCommands are instantiated once per view. The View object may be retrieved via self.view



ST3

TextCommands are instantiated once per view. The View object may be retrieved via self.view



description ST2≠3

ST2 description(<args>) # => String

Returns a description of the command with the given arguments. Used in the menus, and for Undo / Redo descriptions. Return None to get the default description.



ST3 description(<args>) # => str

Returns a description of the command with the given arguments. Used in the menus, and for Undo / Redo descriptions. Return None to get the default description.



is_enabled ST2≠3

ST2 is_enabled(<args>) # => bool

Returns true if the command is able to be run at this time. The default implementation simply always returns True.



ST3 is_enabled(<args>) # => bool

Returns True if the command is able to be run at this time. The default implementation simply always returns True.



is_visible ST2≠3

ST2 is_visible(<args>) # => bool

Returns true if the command should be shown in the menu at this time. The default implementation always returns True.



ST3 is_visible(<args>) # => bool

Returns True if the command should be shown in the menu at this time. The default implementation always returns True.



run ST2&3

ST2&3 run(edit, <args>) # => None

Called when the command is run.



want_event ST3

ST3 want_event() # => bool

Return True to receive an event argument when the command is triggered by a mouse action. The event information allows commands to determine which portion of the view was clicked on. The default implementation returns False.




Generated from the official documentation on Sat Oct 29 20:16:44 EEST 2016 by Leonid Shevtsov.