UP | HOME

Windows Terminal 配置

Table of Contents

1 keybindings 配置

选择配置的 settings.json 文件,将如下的配置项目粘贴到配置文件中

{
    "keybindings": [
        { "command": "commandPalette", "keys": "alt+w" },
        { "command": "duplicateTab", "keys": "alt+d" },
        { "command": "closeTab", "keys": "alt+q" },
        { "command": "tabSearch", "keys": "alt+t" },
        { "command": "openNewTabDropdown", "keys": "alt+i" },
        { "command": {"action": "copy", "singleLine": false }, "keys": "alt+c" },
        { "command": "paste", "keys": "alt+v" },
        { "command": "find", "keys": "alt+f" },

        { "command": "nextTab", "keys": "alt+]" },
        { "command": "prevTab", "keys": "alt+[" },

        { "command": "scrollDown", "keys": "alt+j" },
        { "command": "scrollUp", "keys": "alt+k" },
        { "command": "scrollDownPage", "keys": "alt+n" },
        { "command": "scrollUpPage", "keys": "alt+p" },

        { "command": { "action": "switchToTab", "index": 0 }, "keys": "alt+1" },
        { "command": { "action": "switchToTab", "index": 1 }, "keys": "alt+2" },
        { "command": { "action": "switchToTab", "index": 2 }, "keys": "alt+3" },
        { "command": { "action": "switchToTab", "index": 3 }, "keys": "alt+4" },
        { "command": { "action": "switchToTab", "index": 4 }, "keys": "alt+5" },
        { "command": { "action": "switchToTab", "index": 5 }, "keys": "alt+6" },
        { "command": { "action": "switchToTab", "index": 6 }, "keys": "alt+7" },
        { "command": { "action": "switchToTab", "index": 7 }, "keys": "alt+8" },
        { "command": { "action": "switchToTab", "index": 8 }, "keys": "alt+9" }
    ]
}

2 profile 配置

在配置时添加 suppressApplicationTitle 的设置是必须的,否则一些 SSH 会话标签页 的名称会执行的命令修改,会影响标签页搜索

{
    "guid": "{88888888-8888-8888-8888-888888888888}",
    "name": "name",
    "commandline": "ssh user@hostname",
    "startingDirectory": "E:\\Code",
    "suppressApplicationTitle": true,
    "hidden": false
}

启用 Ubuntu 的配置方式如下

{
    "guid": "{99999999-8888-8888-8888-666666666666}",
    "hidden": false,
    "name": "Ubuntu-18.04",
    "startingDirectory": "//wsl$/Ubuntu-18.04/home/mes/work/nant",
    "source": "Windows.Terminal.Wsl"
}

Last Updated 2021-02-10 Wed 14:27. Created by Jinghui Hu at 2020-12-23 Wed 13:26.