Visual Studio Code. How can I add several command

2019-09-13 04:44发布

I want to execute 2 commands on 1 hotkey "F4"

  1. workbench.action.toggleSidebarVisibility
  2. workbench.action.toggleActivityBarVisibility

I am trying to use this code, but it doesn't work.

{
  "key": "F4",                
  "command": "workbench.action.toggleSidebarVisibility && workbench.action.toggleActivityBarVisibility" 
}

1条回答
可以哭但决不认输i
2楼-- · 2019-09-13 05:37

Not possible, at least not as of today with a vanilla installation.

But you can try this extension here, it creates macros from multiple commands, which can then be bound to a shortcut: https://marketplace.visualstudio.com/items?itemName=geddski.macros

查看更多
登录 后发表回答