Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>RunTaskOnSaveNew to Visual Studio Code? Get it now.
RunTaskOnSave

RunTaskOnSave

nishimine

|
20 installs
| (0) | Free
Automatically run a VSCode task when a file matching your specified regular expression is updated. Useful for automating repetitive tasks.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

RunTaskOnSave

This VSCode extension triggers tasks defined in tasks.json upon saving files whose paths match a specified regular expression pattern.

Installation

Install the extension from the VSCode Marketplace. Edit your configuration file (e.g., .vscode/settings.json) as needed.

Configuretion

Example

Here’s an example of settings to include in .vscode/settings.json:

{
  "nishimine.runtaskonsave": {
    "enableNotifications": true,
    "ruleSet": [
      {
        "filePathMatchRegex": "\\.(jsx?|tsx?|cpp|h)$",
        "filePathIgnoreRegex": "(/node_modules/|/build/|/dist/)$",
        "taskLabel": "Echo Hoge",
        "stopPreviousTask": true
      }
    ]
  }
}

Here’s an example of settings to include in .vscode/tasks.json:

{
  "version": "2.0.0",
  "tasks": [
    {
      "label": "Echo Hoge",
      "type": "shell",
      "command": "echo",
      "args": ["hoge"],
      "problemMatcher": [],
      "group": {
        "kind": "none",
        "isDefault": false
      }
    }
  ]
}
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft