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

Command 'toggle' not found #4

Open
mbrowne opened this issue Jul 5, 2017 · 9 comments
Open

Command 'toggle' not found #4

mbrowne opened this issue Jul 5, 2017 · 9 comments

Comments

@mbrowne
Copy link

mbrowne commented Jul 5, 2017

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").

@lostdj
Copy link

lostdj commented Sep 5, 2017

@mbrowne and anyone else: the Option 2 from readme using two configs works.

@problematik
Copy link

@mbrowne @lostdj Just played around with this and if you put "command": "settings.cycle" instead of "command": "toggle" it works! At least for me:)

@SheepDomination
Copy link

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
            }
        ]
    } 
}

@ConorSheehan1
Copy link

@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.

@tigregalis
Copy link

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.

@x029a
Copy link

x029a commented Oct 22, 2020

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.

@spence
Copy link

spence commented Dec 21, 2020

For anyone else here, a restart of Visual Studio Code was also required to get this working.

@ab-gord
Copy link

ab-gord commented Jan 12, 2022

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.

@sajt
Copy link

sajt commented Jan 19, 2024

You have to install Toggle extension. https://marketplace.visualstudio.com/items?itemName=rebornix.toggle

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

10 participants