gpt4 book ai didi

json - Windows 终端选项卡快捷方式不起作用,类型不正确,预期对象

转载 作者:行者123 更新时间:2023-12-04 09:34:50 25 4
gpt4 key购买 nike

No keyboard shortcut options to jump to profile
当我查看 settings.json 文件时,键 ctrl+shift+NUMBER 应该跳转到某个控制台配置文件,但他们看不到,可以工作。通过 Visual Studio Code 查看它,错误消息是“类型不正确。预期的“对象”。
Error shown in VS Code
settings.json 中的键绑定(bind):

"keybindings": [
{
"command": "closePane",
"keys": [
"ctrl+shift+w"
]
},
{
"command": "copy",
"keys": [
"ctrl+shift+c"
]
},
{
"command": "duplicateTab",
"keys": [
"ctrl+shift+d"
]
},
{
"command": "newTab",
"keys": [
"ctrl+shift+t"
]
},
{
"command": "newTabProfile0",
"keys": [
"ctrl+shift+1"
]
},
{
"command": "newTabProfile1",
"keys": [
"ctrl+shift+2"
]
},
{
"command": "newTabProfile2",
"keys": [
"ctrl+shift+3"
]
},
{
"command": "newTabProfile3",
"keys": [
"ctrl+shift+4"
]
},
{
"command": "newTabProfile4",
"keys": [
"ctrl+shift+5"
]
},
{
"command": "newTabProfile5",
"keys": [
"ctrl+shift+6"
]
},
{
"command": "newTabProfile6",
"keys": [
"ctrl+shift+7"
]
},
{
"command": "newTabProfile7",
"keys": [
"ctrl+shift+8"
]
},
{
"command": "newTabProfile8",
"keys": [
"ctrl+shift+9"
]
},
我的 settings.json 文件的结构方式是否存在问题?
谢谢

最佳答案

您需要构建您的键绑定(bind)以使用命令结构打开一个新选项卡:{ "action": "newTab", "index": 0 }配置文件只是一个数组,通过索引而不是 name 访问键绑定(bind)。 .因此,您可以访问前 9 个配置文件以在新选项卡中打开,如下所示:

{ "command": { "action": "newTab", "index": 0 }, "keys": "ctrl+shift+1" },
{ "command": { "action": "newTab", "index": 1 }, "keys": "ctrl+shift+2" },
{ "command": { "action": "newTab", "index": 2 }, "keys": "ctrl+shift+3" },
{ "command": { "action": "newTab", "index": 3 }, "keys": "ctrl+shift+4" },
{ "command": { "action": "newTab", "index": 4 }, "keys": "ctrl+shift+5" },
{ "command": { "action": "newTab", "index": 5 }, "keys": "ctrl+shift+6" },
{ "command": { "action": "newTab", "index": 6 }, "keys": "ctrl+shift+7" },
{ "command": { "action": "newTab", "index": 7 }, "keys": "ctrl+shift+8" },
{ "command": { "action": "newTab", "index": 8 }, "keys": "ctrl+shift+9" }

关于json - Windows 终端选项卡快捷方式不起作用,类型不正确,预期对象,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62638175/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com