Vscode: workbench.action.togglePanelPosition was removed?

Created on 12 Feb 2020  路  8Comments  路  Source: microsoft/vscode



  • VSCode Version: 1.42.0
  • OS Version: macOS catalina

Steps to Reproduce:

  1. Try to add a new shortcuts into keybinding.json
  2. the autocomplete doesnt have 'workbench.action.togglePanelPosition'


Does this issue occur when all extensions are disabled?: Yes

*as-designed

Most helpful comment

@dschuessler please use this for a single keybind method to get the old behavior

    {
        "key": "<your keybind here>",
        "command": "workbench.action.positionPanelRight",
        "when": "panelPosition == 'bottom'"
    },
    {
        "key": "<your keybind here>",
        "command": "workbench.action.positionPanelBottom",
        "when": "panelPosition == 'right'"
    }

All 8 comments

@gjsjohnmurray
Oh, thats a real bummer

@udielenberg

You can use an extension like https://marketplace.visualstudio.com/items?itemName=hoovercj.vscode-settings-cycler to create your own toggle command between any positions:

{
    "key": "F4",
    "command": "toggle",
    "args": {
        "id": "panelLocation", // must be unique
        "values": [ // Note: use the same settings in each values object
            {
                                 "workbench.panel.defaultLocation": "right"
            },
            {
                                  "workbench.panel.defaultLocation": "bottom"
            }
        ]
    }
}

why not keep that command (just right <->bottom, or plus: left -> bottom), that is useful and we just need one key binding....

Feel sad it is removed.

Having a separate command for each possible cycle explodes quickly. With two positions its one command, with three its 4, if we ever add a fourth it'd be 11.

@JacksonKearl I hope it is ok if I ask here, because I think it is safe to assume, people affected by this change will look for a solution here.

You're example doesn't work for me. According to https://github.com/hoovercj/vscode-api-playground/issues/4#issuecomment-330988921 "command": "toggle" needs to be replaced with "command": "settings.cycle", but even then the panel stays in its place. Have you tried it yourself?

@sbatten I would expect the panel to write to and read from "workbench.panel.defaultLocation" for its location.

@dschuessler please use this for a single keybind method to get the old behavior

    {
        "key": "<your keybind here>",
        "command": "workbench.action.positionPanelRight",
        "when": "panelPosition == 'bottom'"
    },
    {
        "key": "<your keybind here>",
        "command": "workbench.action.positionPanelBottom",
        "when": "panelPosition == 'right'"
    }
Was this page helpful?
0 / 5 - 0 ratings

Related issues

DovydasNavickas picture DovydasNavickas  路  3Comments

chrisdias picture chrisdias  路  3Comments

biij5698 picture biij5698  路  3Comments

shanalikhan picture shanalikhan  路  3Comments

omidgolparvar picture omidgolparvar  路  3Comments