Visual Studio Code Plugin named multi-command
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode
src
test
.gitignore
.vscodeignore
CHANGELOG.md
LICENSE
README.md
package.json
tsconfig.json
vsc-extension-quickstart.md

README.md

multi-command README

This extension can create command sequence as one command and bind a key.

Features

  • create command sequence as one command and bind a key.
  • set interval between each command execution.

Extension Settings

Settings has 2 steps.

  1. Create command sequence as one command in settings.json.
    For example:

    "multiCommand.commands": [
        {
            "command": "multiCommand.down3Lines",
            "sequence": [
                "cursorDown",
                "cursorDown",
                "cursorDown"
            ]
        },
        {
            "command": "multiCommand.swapChar",
            "interval": 30,
            "sequence": [
                "cursorLeftSelect",
                "editor.action.clipboardCutAction",
                "cursorRight",
                "editor.action.clipboardPasteAction"
            ]
        }
    ]

    First sequence is named "multiCommand.down3Lines" and executes "cursorDown" command 3 times.

    Second sequence is named "multiCommand.swapChar". This sequence swaps cursor's left character and the right character. If a command is executed asynchronousely, you can set time interval between each command execution using "interval" configuration(milliseconds).

  2. Bind a key to created command sequence in keybindings.json.
    For example:

    { "key": "F1", "command": "multiCommand.down3Lines", "when": "editorTextFocus"},
    { "key": "F2", "command": "multiCommand.swapChar", "when": "editorTextFocus"}

Advanced Settings

Pass arguments to commands

You can pass arguments to commands by defining a command sequence with args parameter. For Example:

{
    "command": "multiCommand.cutAndType",
    "sequence": [
       "editor.action.clipboardCutAction",
       {"command": "type", "args": {"text": "CUT !!"}}
    ]
}

This sequence cut selected text and type "CUT !!".

Release Notes

1.2.0

New Feature: Pass arguments to commands.

1.1.0

Reloads settings.json when the file is changed.
Now, you can use a custom multi-command immediately after adding it in the settings.json without restarting vscode.

1.0.0

Initial release.