Home

Run Commands

Execute multiple commands that can be repeated with the last command

OverviewRun Commands

  • Key: cursorPlus.runCommands
  • Description: Run multiple commands in sequence, with the ability to repeat them using cursorPlus.last

This command is same as VS Code's built-in runCommands command. The only difference is that it can be repeated with cursorPlus.last.

ArgsRun Commands

The command accepts these arguments:

keytypedefaultdescription
commandsarray-Commands to execute
└─ <array-item>-Individual command to run

ExampleRun Commands

Keyboard shortcutExampleRun Commands

keybindings.json
[
  // Select content between first and last non-whitespace characters:
  {
    "key": "",
    "command": "cursorPlus.runCommands",
    "when": "editorTextFocus",
    "args": {
      "commands": ["cursorPlus.move.textStart", "cursorPlus.select.textEnd"]
    }
  },
  // Delete trailing whitespaces in the current line without moving the cursor:
  {
    "key": "",
    "command": "cursorPlus.runCommands",
    "when": "editorTextFocus",
    "args": {
      "commands": [
        "editor.action.setSelectionAnchor",
        "cursorPlus.move.textEnd",
        "cursorPlus.delete.lineEnd",
        "editor.action.goToSelectionAnchor",
        "editor.action.cancelSelectionAnchor"
      ]
    }
  }
]

ConfigurationRun Commands

This command has no configuration.