Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>ToggleNew to Visual Studio Code? Get it now.

Toggle

Peng Lv

|
27,907 installs
| (14) | Free
Toggle settings in Visual Studio Code
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Toggle VS Code

Toggle any VS Code setting by your favorite keybindings.

How To

Add below sample keybinding entry to your personal keybinding file and make changes accordingly.

{
	"key": "F3",
	"command": "toggle",
	"when": "editorTextFocus",
	"args": {
		"id": "minimap",
		"value": [
			{
				"editor.minimap.enabled": true
			},
			{
				"editor.minimap.enabled": false
			}
		]
	}
},
{
	"key": "F4",
	"command": "toggle",
	"when": "editorTextFocus",
	"args": {
		"id": "zen",
		"value": [
			{
				"editor.minimap.enabled": true,
				"workbench.statusBar.visible": true
			},
			{
				"editor.minimap.enabled": false,
				"workbench.statusBar.visible": false
			}
		]
	}
}

key The shortcut you want to use

command Command should always be toggle. You can create multiple keybindings and use the same command name.

args arguments for the settings you want to toggle.

args.id This is the unique id/name for the set of settings you want to toggle.

args.value This is an array for settings you want to toggle. Every item in this array is a simple JavaScript dictionary, the format is like

{
	"<SettingName>": <SettingValue>,
	"<SettingName>": <SettingValue>,
	...
}

Credit

Icons made by Bryn Taylor from www.flaticon.com is licensed by CC 3.0 BY
  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2023 Microsoft