wk-j / vscode-save-and-run

Visual Studio Code extension to run commands whenever a file is saved https://marketplace.visualstudio.com/items?itemName=wk-j.save-and-run
Apache License 2.0
32 stars 7 forks source link
csx extension fsx vscode

Run saved file in Terminal

Version Installs

Fork from vscode-runonsave

Simplify original extension by pass command into Terminal directly without spawn process, so we don't lose output colors.

Features

Configuration

Add "saveAndRun" configuration to user or workspace settings.

Sample Config

"saveAndRun": {
  "commands": [
    {
      "match": ".*",
      "cmd": "echo 'I run for all files.'",
      "useShortcut": false,
      "silent": false
    },
    {
      "match": "\\.txt$",
      "cmd": "echo 'I am a .txt file ${file}.'",
      "useShortcut": false,
      "silent": false
    }
  ]
}

Commands

The following commands are exposed in the command palette

Placeholder Tokens

Commands support placeholders similar to tasks.json.

Environment Variable Tokens

License

Apache