#6 用
https://github.com/ryuta46/vscode-multi-command 凑新 command 勉强用了,when 条件还是有点繁琐,下面是例子:
```json5
// settings.json
{
"multiCommand.commands": [
{
"command": "intellijMap.hideAllPanels",
"sequence": [
"workbench.action.closeSidebar",
"workbench.action.closePanel",
"workbench.action.focusActiveEditorGroup"
]
},
{
"command": "intellijMap.showAllPanels",
"sequence": [
"workbench.action.togglePanel",
"workbench.action.toggleSidebarVisibility",
"workbench.action.focusSideBar"
]
}
]
}
```
```json5
// keybindings.json
{
{
"key": "ctrl+shift+f12",
"command": "-editor.action.peekImplementation",
"when": "editorHasImplementationProvider && editorTextFocus && !inReferenceSearchEditor && !isInEmbeddedEditor"
},
{
"key": "ctrl+shift+f12",
"command": "intellijMap.hideAllPanels",
"when": "sideBarVisible || panelVisible"
},
{
"key": "ctrl+shift+f12",
"command": "intellijMap.showAllPanels",
"when": "!sideBarVisible && !panelVisible"
},
}
```