Sublime Forum

Auto-add detected plugin commands to Command Pallete

#1

It is always quite cumbersome to me that I have to always add each command definition manually into a .sublime-commands file if I want to be able to use it from the command pallete.

I recommend a new option be created - “Auto Populate Command Pallete”. If set to true - then in addition to populating the command pallete from commands found in .sublime-commands files - any commands that are found in plugin .py files will also be automatically added so that the command pallete represents a complete working set of all available and possible commands available to the user at that current time.

It could get the caption for the command from a “description()” method in the class - otherwise if no “description()” method is there it could just use the command name as the caption. Also If a user wanted to not have certain commands show up on the command pallette - they could add them to a “command_pallete_exclude list”.

0 Likes

#2

https://github.com/qfel/RunCommand

Adding them to Command Palette is probably not very useful:

Some commands require parameters which is difficult to enter by hand.
Some commands are not intended to be used by users, but are used internally by plugins.
And some commands are completely useless in the Command Palette (cursor move, …).

So IMHO the best way to manage them is via a .sublime-commands file.

0 Likes

#3

The expectation is that each plugin will have a .sublime-commands file, and it will be filled with the entries that the plugin would like to be added to the command palette.

0 Likes