vscode-api-playground
vscode-api-playground copied to clipboard
Command 'toggle' not found
I tried to use this plugin by adding the following to keybindings.json:
{
"key": "F4",
"command": "toggle",
"when": "editorTextFocus",
"args": {
"id": "autoReveal", // must be unique
"overrideWorkspaceSettings": true,
"values": [ // Note: use the same settings in each values object
{
"explorer.autoReveal": true
},
{
"explorer.autoReveal": false
}
]
}
}
...but it doesn't work. When I press F4, I get a warning: "command 'toggle' not found".
I'm on Visual Studio Code 1.13.1. There are no error messages in the console (even with settings.cycle.logLevel set to "log").
@mbrowne and anyone else: the Option 2
from readme using two configs works.
@mbrowne @lostdj Just played around with this and if you put "command": "settings.cycle"
instead of "command": "toggle"
it works! At least for me:)
I'm not getting any toggling when using the keyboard short-cut ctrl+shift+p
?
{
"key": "ctrl+shift+p",
"command": "settings.cycle",
"when": "editorTextFocus",
"args":{
"id":"extenView",
"value":[
{
"workbench.view.extensions":true
},
{
"workbench.view.extensions":false
}
]
}
}
@mbrowne @lostdj Just played around with this and if you put
"command": "settings.cycle"
instead of"command": "toggle"
it works! At least for me:)
Note you need the settings cycler extension to use settings.cycle.
The example just needs to be corrected on the Visual Studio Marketplace. Looks like the original example was copied from another extension "toggle" which the author references.
Really useful extension, but that almost threw me.
Just came across this from Google. Issue is from 2017. but the readme on the marketplace is incorrect still, and the solution here for settings.cycle
worked.
For anyone else here, a restart of Visual Studio Code was also required to get this working.
I'm here because of the examples in the book "Making VS Code Awesome".
Turns out I had to search for and install the "Toggle" extension -- the book said this but I didn't see it.
"command": "toggle" works now.
edit: I'm not using the tools in this repo, but this page came up on Google search for my issue. Leaving the comment in case it helps anyone else.
You have to install Toggle extension. https://marketplace.visualstudio.com/items?itemName=rebornix.toggle