emeraldwalk / vscode-runonsave

Visual Studio Code extension to run commands whenever a file is saved.
Apache License 2.0
182 stars 57 forks source link

Not working #35

Closed nextgenthemes closed 4 years ago

nextgenthemes commented 5 years ago
Version: 1.39.2
Commit: 6ab598523be7a800d7f3eb4d92d7ab9a66069390
Date: 2019-10-16T10:47:27.951Z
Electron: 4.2.10
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Linux x64 5.3.5-1-default
  1. Installed the extension.
  2. Copied example config.
  3. Enabled it via command palette.
  4. Nothing is happening when I save files.

My config file: The entire "emeraldwalk.runonsave" section is greyed out. I do not know what that means.

{
    "phpcbf.executablePath": "./vendor/bin/phpcbf",
    "editor.minimap.enabled": false,
    "zentabs.maximumOpenedTabs": 5,
    "workbench.activityBar.visible": true,
    "telemetry.enableCrashReporter": false,
    "workbench.enableExperiments": false,
    "workbench.settings.enableNaturalLanguageSearch": false,
    "git.enableSmartCommit": true,
    "emeraldwalk.runonsave": {
        "commands": [
            {
                "match": ".*",
                "isAsync": true,
                "cmd": "echo 'I run for all files.'"
            },
            {
                "match": "\\.txt$",
                "cmd": "echo 'I am a .txt file ${file}.'"
            },
            {
                "match": "\\.js$",
                "cmd": "echo 'I am a .js file ${file}.'"
            },
            {
                "match": ".*",
                "cmd": "echo 'I am ${env.USERNAME}.'"
            }
        ]
    }
}
Dragod commented 4 years ago

Does not work for me either. On the vscode footer is saying "Run on Save done" but it actually did nothing.


Version: 1.41.1 (user setup)
Commit: 26076a4de974ead31f97692a0d32f90d735645c0
Date: 2019-12-18T14:58:56.166Z
Electron: 6.1.5
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Windows_NT x64 10.0.18363

"todo-tree.highlights.enabled": true,
    "editor.fontSize": 13,
    "emeraldwalk.runonsave": {
        "commands": [
            {
                "match": ".*",
                "isAsync": true,
                "cmd": "echo 'I run for all files.'"
            },
            {
                "match": "\\.txt$",
                "cmd": "echo 'I am a .txt file ${file}.'"
            },
            {
                "match": "\\.js$",
                "cmd": "echo 'I am a .js file ${file}.'"
            },
            {
                "match": ".*",
                "cmd": "echo 'I am ${env.USERNAME}.'"
            }
        ]
    }
Joey92 commented 4 years ago

My config file: The entire "emeraldwalk.runonsave" section is greyed out. I do not know what that means.

That usually means there is no extension that reads the config. Be sure to install the correct extension from emeraldwalk. There are 3 on the marketplace. Happened to me too first..

Dragod commented 4 years ago

Actually used another extension SaveAndRun and worked perfectly, if anyone still stuck here

bmingles commented 4 years ago

Yes, I believe that greyed out means extension is either not installed or disabled. Closing since this doesn't seem to be an issue with the extension, but feel free to re-open if you find otherwise.

dreamflasher commented 4 years ago

@bmingles Happened to me too, the problem is that there are 3 extensions called Run on Save – would be great if you'd add to the description that one needs to make sure to install the emeraldwalk one.

donjajo commented 4 years ago

Not working for me either. Mine is not greyed out

Electron v9.1.2
Chromium v83.0.4103.122
Node v12.14.1v8 v8.3.110.13-electron.0
OS: Linux 5.7.12-arch1-1