Skip to content

Toggle any VS Code setting by your favorite keybindings.

Notifications You must be signed in to change notification settings

rebornix/vscode-toggle

Repository files navigation

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

About

Toggle any VS Code setting by your favorite keybindings.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published