Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ArturoDent opened this issue Mar 22, 2019 · 10 comments
Closed

Comments

@ArturoDent
Copy link

ArturoDent commented Mar 22, 2019

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
Copy link

To me the macro stops working...

@julian-digital
Copy link

julian-digital commented Apr 4, 2019

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
Copy link
Author

ArturoDent commented Apr 4, 2019

{
    "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
Copy link

julian-digital commented Apr 6, 2019

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
Copy link

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

@ArturoDent
Copy link
Author

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
Copy link
Owner

ryuta46 commented Dec 14, 2019

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

Other macro extension have the same issue.
jeff-hykin/macro-commander#1 (comment)

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
Copy link
Owner

ryuta46 commented Jan 12, 2020

#16 (comment)

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

@ryuta46 ryuta46 closed this as completed Jan 12, 2020
@ArturoDent
Copy link
Author

ArturoDent commented Jan 12, 2020

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
Copy link

Binly42 commented Jan 7, 2022

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants