展开全部
微软的vscode,作为636f70793231313335323631343130323136353331333363393636时下最流行的几款编辑器之一。刚出来的时候我就开始体验了。其实这几年用过挺多的编辑器,影响比较深的就只有前端利器webstorm还有小清新atom,至于为什么转投到vscode就仁者见仁智者见智了,就不多说了。这里主要介绍下我自己的关于vscode自带的终端的快捷键设置,默认的终端切换实在是太麻烦啦··
1、可以通过cmd+shift+p,搜索keyboard看下快捷键设置
2、在设置里点击keybindings.json打开配置json
3、在打开的配置文件中里搜索terminal。可以看到关于终端切换的没有匹配的快捷键,放在这里也是要让我们自己扩展的意思。
4、最后在keybinding.json中把下面的代码复制过去覆盖默认值,当然,绑定的快捷键你们可以根据自己习惯调整。// 将键绑定放入此文件中以覆盖默认值
[
{
"key": "ctrl+tab",
"command": "workbench.action.terminal.focusNext", // 切换到下一个终端
"when": "terminalFocus"
},
{
"key": "ctrl+w",
"command": "workbench.action.terminal.kill", // 关闭当前终端
"when": "terminalFocus"
},
{
"key": "ctrl+t",
"command": "workbench.action.terminal.new", // 打开新的终端
"when": "terminalFocus"
},
{
"key": "ctrl+1",
"command": "workbench.action.terminal.focusAtIndex1", // 打开终端1
"when": "terminalFocus"
},
{
"key": "ctrl+2",
"command": "workbench.action.terminal.focusAtIndex2",
"when": "terminalFocus"
},
{
"key": "ctrl+3",
"command": "workbench.action.terminal.focusAtIndex3",
"when": "terminalFocus"
},
{
"key": "ctrl+4",
"command": "workbench.action.terminal.focusAtIndex4",
"when": "terminalFocus"
}
]