ryuta46 / vscode-multi-command

Visual Studio Code Plugin named multi-command
MIT License
229 stars 14 forks source link

Green squigglies warning under multiCommand.blahblah in keybindings.json #16

Closed ArturoDent closed 4 years ago

ArturoDent commented 5 years ago

I think this just started to happen with vscode v1.32:

multiCommandGreenSquigglies

Hovering over them shows "Value is not accepted." I disabled and re-enabled multi-command extension and it did not change the above behaviour. Nor did uninstalling and re-installing multi-command.

The keybinding and macro work as expected, it is just the warnings that have appeared I don't like.

Using v1.3.0 of multi-command.

pingshunhuang commented 5 years ago

To me the macro stops working...

julian-digital commented 5 years ago

Set the value "extension.multiCommand.execute" in "command" property, add the property "args" and assign the multiCommand name as its value. It would look like:

{
    "key": "ctrl+shift+z",
    "command": "extension.multiCommand.execute",
    "args": "terminalLab"
}

It seems some recent Visual Studio Code update added the "args" property support in keyboard shortcuts file (keybindings.json). This property passes the arguments for command execution. I say "it seems" because I didn't read the notes of last update that usually mention changes like this and I think that wasting time trying to solve this type of problems is a good reasons to don't ignore them nevermore.

Finally, the same situation is happening for other extensions which have new "command" values or in the worst case don't even have one.

ArturoDent commented 5 years ago
{
    "key": "ctrl+shift+/",
    "command": "extension.multiCommand.execute",

    //  "args": "commentDown"

    "args": {
       "name": "commentDown"
    }
}

Your version does get rid of the green squiggly warnings but now it opens a quickPanel with all the multiCommands to choose from. So it doesn't run the commands until one is chosen from the quickPanel. Which is not good.

I tried with the code above (and text instead of name) but both did the same thing - just opening the panel but not immediately running the command.

julian-digital commented 5 years ago

Sorry for that. I din't proved it in a proper way and then I though It was a full solution. Really sorry.

I think we need to wait for documentation update because the new command value is not there. On the other hand, I think the issue needs a different title or needs to be reported in a new issue because current issue title is not relevant and in strict mode is solved. This is the first time here and I dont know rules but I t will. Thanks

Joebeazelman commented 5 years ago

Any solutions here? I suddenly got the squiggles for no apparent reason. The command doesn't appear to be working either.

ArturoDent commented 5 years ago

Strange - I have had the warnings since April, 2019 but the commands still work perfectly fine for me. I thought I heard that other macro extensions had the same issue but I don't know if that is the case. I haven't tried others since multi-command still works for me.

ryuta46 commented 4 years ago

I investigated this issue but I couldn't find any way to avoid this warning.

Other macro extension have the same issue. https://github.com/jeff-hykin/macro-commander/issues/1#issuecomment-505951698

But the commands work fine for me. If you have a command sequence that does not work as you expected, please report it as a new issue.

In the next version, I'll add arguments for a command extension.multi Command.execute to allow to execute a command sequence you created as following,

    {
        "key": "ctrl+t", 
        "command": "extension.multiCommand.execute" ,
        "args": {
            "command": "multiCommand.down3Lines"
        }
    },

Please use this new style if you want to avoid the warnings.

ryuta46 commented 4 years ago

https://github.com/ryuta46/vscode-multi-command/issues/16#issuecomment-565693380

I released the new style of key binding definition in v1.4.0.

ArturoDent commented 4 years ago

Thank you for the updates - much appreciated. If you search for "multi-command" on Stack Overflow you will see how many times I, Mark, have recommended this extension!

Binly42 commented 2 years ago

Seems that this issue had been solved? Maybe by VSCode official?

If that true, maybe its okay to remove the warn tip in Readme ~