Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,17 @@
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceRoot}" ],
"stopOnEntry": false,
"sourceMaps": true,
"outFiles": [ "${workspaceRoot}/out/src/**/*.js" ],
"preLaunchTask": "npm"
"preLaunchTask": "npm: compile"
},
{
"name": "Launch Tests",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceRoot}", "--extensionTestsPath=${workspaceRoot}/out/test" ],
"stopOnEntry": false,
"sourceMaps": true,
"outFiles": [ "${workspaceRoot}/out/test/**/*.js" ],
"preLaunchTask": "npm"
"preLaunchTask": "npm: compile"
}
]
}
2 changes: 1 addition & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"args": ["run", "compile", "--loglevel", "silent"],

// The tsc compiler is started in watching mode
"isWatching": true,
"isBackground": true,

// use the standard tsc in watch mode problem matcher to find compile problems in the output.
"problemMatcher": "$tsc-watch",
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## 1.6.1
### Added
- Multiple arguments for the same command

## 1.6.0
### Added
- [Variable substitution like `${userHome}` or `${config:editor.fontSize}` in arguments.](/README.md#pass-arguments-to-commands)
Expand Down
27 changes: 26 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ In case using settings.json, the settings has 2 steps.
"when": "editorTextFocus"
},
{
"key": "F21",
"key": "F2",
"command": "extension.multiCommand.execute",
"args": { "command": "multiCommand.swapChar" },
"when": "editorTextFocus"
Expand Down Expand Up @@ -208,6 +208,23 @@ For example:
}
],
```
#### Multiple arguments to commands
Now, you can pass an array of arguments to commands.
For Example:

```json
{
"command": "multiCommand.helloWorld",
"sequence": [
{"command": "editor.action.insertLineAfter"},
{
"command": "type",
"args": [{"text": "Hello\n"},{"text": "world!"},]
},
{"command": "editor.action.insertLineAfter"},
}
```


Current supported variables:

Expand Down Expand Up @@ -328,3 +345,11 @@ With Command Runner extension, you can write a command sequence with shell comma
```

See the [Command Runner document](https://marketplace.visualstudio.com/items?itemName=edonet.vscode-command-runner) for details on how to use the extension.

### Find all available command ids

> Note: You can review the full set of VS Code commands via the Keyboard Shortcuts editor File > Preferences > Keyboard Shortcuts (on macOS Code > Preferences > Keyboard Shortcuts). The Keyboard Shortcuts editor lists all commands built into VS Code or contributed by extensions, along with their keybindings and visibility when clauses.

To get the command's ID right click the command in the list > `Copy Command ID`

From: https://code.visualstudio.com/api/references/commands
Loading