在MacBook的任何地方,我都使用CMD键进行导航(例如:在浏览器中切换选项卡,或者如果选项卡在Windows中打开,则切换多个选项卡)。我如何在VS代码中实现相同的功能。目前我必须使用Ctrl键在打开的文件之间切换,但我想知道是否可以更改一些配置以使用CMD
CMD
Ctrl
rkttyhzu1#
我猜你说的是快捷键ctrl+1选择第一个标签,ctrl+2选择第二个标签等?1.打开keybindings json文件(cmd+shift+p,输入Preferences: Open Keyboard Shortcuts (JSON))。1.将这些添加到文件的末尾:
ctrl+1
ctrl+2
cmd+shift+p
Preferences: Open Keyboard Shortcuts (JSON)
{ "key": "cmd+1", "command": "workbench.action.openEditorAtIndex1" }, { "key": "cmd+2", "command": "workbench.action.openEditorAtIndex2" }, { "key": "cmd+3", "command": "workbench.action.openEditorAtIndex3" }, { "key": "cmd+4", "command": "workbench.action.openEditorAtIndex4" }, { "key": "cmd+5", "command": "workbench.action.openEditorAtIndex5" }, { "key": "cmd+6", "command": "workbench.action.openEditorAtIndex6" }, { "key": "cmd+7", "command": "workbench.action.openEditorAtIndex7" }, { "key": "cmd+8", "command": "workbench.action.openEditorAtIndex8" }, { "key": "cmd+9", "command": "workbench.action.openEditorAtIndex9" }
字符串如果你还想修改ctrl+tab和ctrl+shift+tab来选择上一个/下一个标签,你也可以添加这些(但请记住,它们可能会与mac快捷方式冲突):
ctrl+tab
ctrl+shift+tab
{ "key": "cmd+tab", "command": "workbench.action.quickOpenPreviousRecentlyUsedEditorInGroup", "when": "!activeEditorGroupEmpty" }, { "key": "cmd+shift+tab", "command": "workbench.action.quickOpenNavigatePreviousInEditorPicker", "when": "inEditorsPicker && inQuickOpen" },
型
1条答案
按热度按时间rkttyhzu1#
我猜你说的是快捷键
ctrl+1
选择第一个标签,ctrl+2
选择第二个标签等?1.打开keybindings json文件(
cmd+shift+p
,输入Preferences: Open Keyboard Shortcuts (JSON)
)。1.将这些添加到文件的末尾:
字符串
如果你还想修改
ctrl+tab
和ctrl+shift+tab
来选择上一个/下一个标签,你也可以添加这些(但请记住,它们可能会与mac快捷方式冲突):型