Vscode求一个最大化拆分窗口的插件?

之前用过,我忘记插件名字了……Orz
vscode插件。
感谢!

比如在vscode下,
ctrl B 可以切换左侧导航
ctrl J 可以切换底部控制台
ctrl M 可以最大化组
这几个命令结合起来就可以把当前正在编辑的拆分窗口最大化,方便码字
但操作太费心了,我之前找到一个插件可以实现同样地功能,重做系统后忘了叫啥


还是自己写个吧……

package.json

{
    "name": "toggle-panel",
    "displayName": "toggle Panel",
    "description": "Ctrl Space",
    "version": "1.0.0",
    "publisher": "zeronofreya",
    "engines": {
      "vscode": "^1.75.0"
    },
    "main": "./extension.js",
    "activationEvents": [
        "*"
    ],
    "contributes": {
      "commands": [{
        "command": "togglePanel",
        "title": "Toggle Panel"
      }],
      "keybindings": [{
        "command": "togglePanel",
        "key": "ctrl+space",
        "mac": "cmd+space",
        "when": "editorTextFocus"
      }]
    }
  }

extension.js

const vscode = require("vscode");

function activate(context) {
  let status = true;
  vscode.commands.executeCommand("workbench.action.focusPanel");

  let disposable = vscode.commands.registerCommand("togglePanel", async () => {
    if (status) {
      await vscode.commands.executeCommand("workbench.action.closePanel");
      await vscode.commands.executeCommand("workbench.action.maximizeEditorHideSidebar");
      status = false;
    } else {
      await vscode.commands.executeCommand("workbench.action.focusPanel");
      await vscode.commands.executeCommand("workbench.action.evenEditorWidths");
      await vscode.commands.executeCommand("workbench.view.explorer");
      status = true;
    }
    
    await vscode.commands.executeCommand(
      "workbench.action.focusActiveEditorGroup"
    );
  });

  context.subscriptions.push(disposable);
}

module.exports = {
  activate,
  deactivate: function () {},
};

问题是我没找到判断面板是否显示的方法,暂时先这样

具体描述下?

好的,已在问题中补充

我不太确定有没有正确理解了你的意思,但或许你想找的是这个功能?

Floating windows

You can open an editor, the terminal, or specific views in a floating window. This is useful in a multi-monitor setup, where you can move the editor to another monitor or even to a different location on the same monitor.

To open an editor in a floating window, drag it out of the main window and drop it anywhere outside of the current VS Code window.

Floating windows are capable of opening as many editors as you like in a grid layout. The windows will restore at their location after restart and reopen all the editors within.

Another way to detach an editor is to right-click on an editor tab, and select the option Move into New Window (workbench.action.moveEditorToNewWindow) or Copy into New Window (Ctrl+K O).

Floating windows from editor tab menu

To move an entire editor group, use the Move Editor Group into New Window (unassigned) or Copy Editor Group into New Window (unassigned) commands.