Skip to content

Sublime Text commands.

Ashwin Shenoy edited this page Nov 20, 2021 · 2 revisions

This guide provides in depth explanations for various ST commands.

The chain command.


The chain command was added in ST Build 4103. Prior to this build, if you wanted to chain multiple commands, then you basically had 2 options.

  1. Use the Chain of Command Package.
  2. Use the Multicommand Package.

However, with this command being added, there is no longer a need to use these packages.

There are 2 different ways of specifying the command information to the chain command, so that it becomes easier for the users of the above package to understand.

Method 1 (Using the Multicommand syntax)

[
    {
        "keys": ["super+s"],
        "command": "chain",
        "args": {
            "commands": [
                { "command": "echo", "args": { "chain": true  } },
                { "command": "echo", "args": { "chain": false } }
            ]
        }
    }
]

So you specify a dictionary of commands & their arguments.

Method 2 (Using the Chain of command syntax)

[
    {
        "keys": ["super+t"],
        "command": "chain",
        "args": {
            "commands": [
                ["echo", { "chain": true  }],
                ["echo", { "chain": false }]
            ]
        }
    }
]

So you specify a list of commands and their arguments.