kasecato / vscode-intellij-idea-keybindings

Port of IntelliJ IDEA key bindings for VS Code.
https://marketplace.visualstudio.com/items?itemName=k--kato.intellij-idea-keybindings
MIT License
810 stars 135 forks source link

`Ctrl-Shift-F12` results in `command 'workbench.action.maximizeEditor' not found` #341

Open htbkoo opened 3 months ago

htbkoo commented 3 months ago

First of all, thanks a lot for creating this extension which is extremely helpful for users who are used to Keybindings from IntelliJ IDEA! 👍

Recently, I had bumped into this problem with a very frequently used shortcut - the Ctrl-Shift-F12 to maximize editor (and hide all the panels) - instead of maximizing the editor, I just get this error message:

command 'workbench.action.maximizeEditor' not found

Are there any configuration changes I need to (I have not used VS Code in a while, so probably something has changed and ruined the whole setup after all the auto-update, which I should have just turned off completely 🤦 )

Let me know if you need more information. 💪

Thank you!

htbkoo commented 3 months ago

I had tried to search for similar issues with keywords like maximizeEditor / F12 / expand (reference: https://github.com/microsoft/vscode/issues/197227) but did not find anything directly related.

Please feel free to close this if this is actually a duplicate 🙇

kasecato commented 3 months ago

Let me remove support for this key binding in the next release. To support IntelliJ behavior, we need to keep the previous sidebar and bottom panel state. In addition, focus control is also necessary because the focus moves to the terminal on its own when the bottom panel is the terminal.

            {
                "key": "ctrl+shift+f12",
                "mac": "cmd+shift+f12",
                "command": "runCommands",
                "args": {
                    "commands": [
                        "workbench.action.toggleSidebarVisibility",
                        "workbench.action.togglePanel"
                    ]
                },
                "when": "(sideBarVisible && panelVisible) || (!sideBarVisible && !panelVisible)",
                "intellij": "Toggle maximizing editor"
            },
htbkoo commented 3 months ago

Thanks a lot for your prompt reply and sharing the information 🙇

grgar commented 2 months ago

There's a few extensions that try to achieve this, but don't do it quite right, so I wrote my own: Sidebars. I didn't think it quite fit here since it requires maintaining some state and currently does so using undocumented/private command calls.