如何默认启动带有多个窗格的新 Windows 终端?
How to start the new Windows Terminal with multiple panes by default?
是否有默认将新 Windows 终端拆分为多个窗格的设置?例如从两列开始,第二列分成两个水平部分?
This feature 目前处于预览模式,它的工作方式将来可能会改变,但目前这可以通过将 startupActions
添加到您的 settings.json.[=18 来实现=]
例如,要从两个窗格开始,垂直拆分并将光标移动到左侧窗格(默认情况下它将保留在最后创建的窗格上),您的 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": []
}
您可以使用的 Some of the commands 是 new-tab
、split-pane
、focus-tab
、move-focus
...
是否有默认将新 Windows 终端拆分为多个窗格的设置?例如从两列开始,第二列分成两个水平部分?
This feature 目前处于预览模式,它的工作方式将来可能会改变,但目前这可以通过将 startupActions
添加到您的 settings.json.[=18 来实现=]
例如,要从两个窗格开始,垂直拆分并将光标移动到左侧窗格(默认情况下它将保留在最后创建的窗格上),您的 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": []
}
您可以使用的 Some of the commands 是 new-tab
、split-pane
、focus-tab
、move-focus
...