Sublime Forum

How do I manually invoke a command?


Please forgive the newbie question, but how do I invoke a command (made available by a plugin), other then via a keybinding? I expected all commands to be available in the “Command Pallete”, but I installed this plugin (just the command, not the keybindings), and when I go to Command Pallete and type “xml” I don’t find any commands…

Thanks in advance.



To add a command to the Command Palette you need define it in a .sublime-commands file. The relevant docs are here: … lette.html

The simplest thing to do is to add a line like this:

{ "caption": "User: Tidy XML", command": "tidy_xml" },

in Package/User/Default.sublime-commands

(Notice that the comma at the end of the line is required unless it’s the last entry in the file.)



Thanks a lot, not only you linked to the appropriate documentation but also gave me a one-liner to solve my specific issue! :smiley: