Skip to content

Instantly share code, notes, and snippets.

@hyliang96
Last active November 11, 2019 17:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hyliang96/18426045e65fc80621d6689f2adec5ed to your computer and use it in GitHub Desktop.
Save hyliang96/18426045e65fc80621d6689f2adec5ed to your computer and use it in GitHub Desktop.
my settings.json, keybindings.json for VS Code
// 将键绑定放在此文件中以覆盖默认值
[
// 在代码和终端间切换
{ "key": "ctrl+`", "command": "workbench.action.terminal.focus"},
{ "key": "ctrl+`", "command": "workbench.action.focusActiveEditorGroup", "when": "terminalFocus"},
// 打开、隐藏内置终端
{ "key": "ctrl+alt+`","command": "workbench.action.terminal.toggleTerminal"},
// 关闭当前终端
{ "key": "ctrl+alt+w","command": "workbench.action.terminal.kill", "when": "terminalFocus"},
// 最大化、复原 终端
{ "key": "ctrl+alt+enter", "command": "workbench.action.toggleMaximizedPanel", "when": "terminalFocus" },
// 去前一屏终端(终端编号-1)
{ "key": "ctrl+alt+up", "command": "workbench.action.terminal.focusPrevious", "when": "terminalFocus" },
// 去后一屏终端(终端编号+1)
{ "key": "ctrl+alt+down", "command": "workbench.action.terminal.focusNext" , "when": "terminalFocus"},
// 去左一窗终端
{ "key": "ctrl+alt+left", "command": "workbench.action.terminal.focusPreviousPane", "when": "terminalFocus" },
// 去右一窗终端
{ "key": "ctrl+alt+right", "command": "workbench.action.terminal.focusNextPane", "when": "terminalFocus" },
// 终端左右分窗: cmd+\
// 终端上下分窗:vscode不支持
// 代码左右: cmd+\
// 上下分窗
{ "key": "shift+cmd+\\", "command": "workbench.action.splitEditorOrthogonal"},
// 选中下一个和当前一样的:cmd+d
// 选中所有和当前一样的
{ "key": "shift+cmd+d", "command": "editor.action.selectHighlights"},
// 调试 ([t]iaoshi)
{ "key": "shift+cmd+t", "command": "workbench.view.debug"},
// 打开最近关闭的文件([l]ast)
{ "key": "shift+cmd+l", "command": "workbench.action.reopenClosedEditor"},
]
@hyliang96
Copy link
Author

It's ok to weite comments // xxxx in the configure file ("*.json") of VS Code. They are legal for VS code, though illegal for standard json.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment