如何默认启动具有多个面板的新Windows终端?

3
有没有设置可以默认将新的 Windows 终端分成多个窗格?例如,开始时有两列,第二列分成两个水平部分?
1个回答

2

此功能目前处于预览模式,其工作方式可能会在未来发生变化,但当前可以通过在settings.json中添加startupActions来实现。

例如,要启动两个垂直分割的窗格,并将光标移动到左侧窗格(它将保留在默认创建的最后一个窗格上),你的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...


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接