vscode快捷键
按 ctrl+shift+p 查找设置文件
Ctrl + W 关闭编辑器
设置定位到终端的快捷键:打开键盘配置文件,搜索focus terminal,找到聚焦到终端的命令,添加ctrl+2(删除被占用的)
{
"key": "ctrl+2",
"command": "workbench.action.terminal.focus"
}
与此同时设置聚焦到下一终端和上一终端的命令(同样删除已占用的),注意when条件,根据提示打开keybindings.json文件修改设置
{
"key": "alt+left",
"command": "workbench.action.terminal.focusPrevious",
"when": "terminalFocus"
},
{
"key": "alt+right",
"command": "workbench.action.terminal.focusNext",
"when": "terminalFocus"
},
{
"key": "ctrl+up",
"command": "workbench.action.terminal.scrollUp",
"when": "terminalFocus"
},
{
"key": "ctrl+down",
"command": "workbench.action.terminal.scrollDown",
"when": "terminalFocus"
},
{
"key": "ctrl+pageup",
"command": "workbench.action.terminal.scrollUpPage",
"when": "terminalFocus"
},
{
"key": "ctrl+pagedown",
"command": "workbench.action.terminal.scrollDownPage",
"when": "terminalFocus"
}
另一方面,定位到文档编辑器可以使用已有的ctrl+1快捷键,定位到资源管理器用ctrl+shift+e,或者更简单的ctrl+0