3

是否有默认将新的 Windows 终端拆分为多个窗格的设置?例如从两列开始,第二列分成两个水平部分?

4

1 回答 1

1

此功能目前处于预览模式,它的工作方式可能会在未来发生变化,但目前这可以通过添加startupActions到您的 settings.json 来完成。

例如,要从两个窗格开始,垂直拆分并将光标移动到左侧窗格(它将停留在最后创建的窗格默认),您的 settings.json 应该如下所示:

{
  "$schema": "https://aka.ms/terminal-profiles-schema",
  "defaultProfile": "{00000000-0000-0000-0000-000000000001}",
  "launchMode": "maximized",
  "startupActions": "split-pane; move-focus left", // This is the new line you need
  "profiles": {
    "defaults": {
    },
    "list": [
      {
        "guid": "{00000000-0000-0000-0000-000000000001}",
        "acrylicOpacity": 0.9,
        "useAcrylic": true,
        "closeOnExit": true,
        "colorScheme": "Solarized Dark",
        "commandline": "\"%PROGRAMFILES%\\Git\\usr\\bin\\bash.exe\" --login -i -l",
        "cursorColor": "#FFFFFF",
        "cursorShape": "bar",
        "fontFace": "Consolas",
        "fontSize": 10,
        "historySize": 9001,
        "icon": "%PROGRAMFILES%\\Git\\mingw64\\share\\git\\git-for-windows.ico",
        "name": "GitBash",
        "padding": "15, 5, 10, 55",
        "snapOnInput": true,
        "startingDirectory": "%USERPROFILE%\\Desktop"
      }
    ]
  },
  "schemes": [],
  "keybindings": []
}

您可以使用的一些命令new-tab, split-pane, focus-tab, move-focus...

于 2021-02-02T20:16:51.437 回答