-
Notifications
You must be signed in to change notification settings - Fork 15
Description
I apologise in advance. This is not a problem with the extension, but I opened it because it is the only way to contact you.
README provides explanations with concrete examples. However, there are cases where a comprehensive explanation would be easier to understand.
I have drawn up the following list.
list
Main parameters
Parameters required to create command sequence.
| Parameter | type | Description |
|---|---|---|
command |
string | User-defined command name. Available in keybindings.json. |
sequence |
array | Include multiple command ID. It will be executed in order from the top. |
Command ID in sequence can also be listed in parallel depending on ||.
This ensures that if the command on the left side of || is not found, the command on the right side will be executed.
If you want to include arguments etc. in the command, use the field keys.
See here.
Option parameters
Optional parameters of command sequence.
| Parameter | type | Description |
|---|---|---|
label |
string | Label displayed in command palette when calling manually. |
description |
string | Description displayed in command palette when calling manually. (dimmed) |
interval |
number | Interval between executions of commands in the sequence. (milliseconds) |
languages |
array | The sequence is displayed only when a document of specified language is opened. If not specified, it applies to all languages. |
If there is no label and description, command (main parameter) is displayed in command palette.
Field keys in sequence
It is used when command ID requires arguments, to specify the number of repetitions, etc.
These keys only work in the field.
| Key | type | Description |
|---|---|---|
command |
string | Command ID provided by VS Code or extensions. |
args |
object | Arguments of command. |
repeat |
number | Number of times command is repeated. |
onSuccess |
array | Excuted when the previous command ends with a success. |
onFail |
array | Excuted when the previous command ends with an error. |
variableSubstitution |
boolean | Set to true if you want to use variable substitution starting with $ in args. |
These must be contained within {} in sequence.
list.md
## Main parameters
Parameters required to create command sequence.
| Parameter | type | Description |
| :--------: | :----: | :---------------------------------------------------------------------- |
| `command` | string | User-defined command name. Available in keybindings.json. |
| `sequence` | array | Include multiple command ID. It will be executed in order from the top. |
Command ID in `sequence` can also be listed in parallel depending on `||`.
This ensures that if the command on the left side of `||` is not found, the command on the right side will be executed.
If you want to include arguments etc. in the command, use the field keys.
See [here](#field-keys-in-sequence).
## Option parameters
Optional parameters of command sequence.
| Parameter | type | Description |
| :-----------: | :----: | :----------------------------------------------------------------------------------------------------------------------------- |
| `label` | string | Label displayed in command palette when calling manually. |
| `description` | string | Description displayed in command palette when calling manually. (dimmed) |
| `interval` | number | Interval between executions of commands in the `sequence`. (milliseconds) |
| `languages` | array | The sequence is displayed only when a document of specified language is opened. If not specified, it applies to all languages. |
If there is no `label` and `description`, `command` (main parameter) is displayed in command palette.
## Field keys in `sequence`
It is used when command ID requires arguments, to specify the number of repetitions, etc.
These keys only work in the field.
| Key | type | Description |
| :--------------------: | :-----: | :---------------------------------------------------------------------------------- |
| `command` | string | Command ID provided by VS Code or extensions. |
| `args` | object | Arguments of `command`. |
| `repeat` | number | Number of times `command` is repeated. |
| `onSuccess` | array | Excuted when the previous `command` ends with a *success*. |
| `onFail` | array | Excuted when the previous `command` ends with an *error*. |
| `variableSubstitution` | boolean | Set to `true` if you want to use variable substitution starting with `$` in `args`. |
These must be contained within `{}` in `sequence`.Use it as you wish. If you are willing to do it, add it to the README or create a wiki. This table will help some people.
If errors are found in the list, please correct them appropriately.