Run Multi command: Execute multi command in command palette.
Sequence displayed:
configured in a specific language.
without language configuration.
Also, if the sequence specifies a particular language, it will only be executed when a file in that language is open. If you do not use this configuration, the default values are for all languages.
Reasons why language is needed
A sequence of commands related to editing provided by VSCode does not matter for language differences.
However, without language configuration, it can cause commands for a particular language to malfunction, such as those provided by extensions.
Of course, you can avoid problems by assigning keybindings to sequence commands. But I don't want to put the effort into assigning keybindings to every sequence command.
In addition, if you have registered a large number of sequences without language configuration, it is difficult to see and select from the command palette.
To prevent malfunctions and make the display in the command palette easier to read, I recommend that you hide the sequences for languages that are not related to the active file.
When opening a 'python' file, only multiCommand.demo.python appears in the command palette and is executable. multiCommand.demo.typejava applies only to 'typescript' and 'javascript', so it is not displayed and cannot be executed.
languages - (Optional) An array of workspace language ids that the rule is restricted to. For example, a rule with languages set to 'typescript' will only appear in the Run Rule... menu if TypeScript is the selected language for the active document.
Expected behavior
Multi command: Execute multi command
in command palette.language
configuration.Also, if the sequence specifies a particular language, it will only be executed when a file in that language is open. If you do not use this configuration, the default values are for all languages.
Reasons why
language
is neededA sequence of commands related to editing provided by VSCode does not matter for language differences.
However, without
language
configuration, it can cause commands for a particular language to malfunction, such as those provided by extensions.Of course, you can avoid problems by assigning keybindings to sequence commands. But I don't want to put the effort into assigning keybindings to every sequence command.
In addition, if you have registered a large number of sequences without
language
configuration, it is difficult to see and select from the command palette.To prevent malfunctions and make the display in the command palette easier to read, I recommend that you hide the sequences for languages that are not related to the active file.
Demonstration configuration
When opening a 'python' file, only
multiCommand.demo.python
appears in the command palette and is executable.multiCommand.demo.typejava
applies only to 'typescript' and 'javascript', so it is not displayed and cannot be executed.Source of idea
In bhughes339.replacerules, the following configurations are possible.