我可以使用 ⌘+num 在 OSX 版 Visual Studio Code 中切换选项卡吗?

我可以使用 ⌘+num 在 OSX 版 Visual Studio Code 中切换选项卡吗?

我一直在查看 VS Code 文档,但没有看到任何可以让我使用 ⌘+n 跳转到选项卡 n 的内容。这在 VS Code 中可行吗?我非常习惯在 chrome 和 sublime text 中使用这些热键。

答案1

将其放入您的“keybindings.json”文件中:

{"key":"cmd+0", "command":"workbench.action.openLastEditorInGroup"},
{"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"}

For advanced customizations open and edit keybindings.json要获取“keybindings.json”文件,请转到“首选项”>“键盘快捷键”,然后在编辑器顶部附近查找。

相关内容