ryuta46 / vscode-multi-command

Visual Studio Code Plugin named multi-command
MIT License
229 stars 14 forks source link

MultiCommand not working with Vim Extension #24

Closed lk-hang closed 3 years ago

lk-hang commented 4 years ago

I have vim extension enabled.

I wanted to use it to toggle vim as follows in settings.json:

    "multiCommand.commands": [
        {
            "command": "multiCommand.toggleVim",
            "sequence": [
                "toggleVim",
                "workbench.action.toggleActivityBarVisibility",
            ]
        }
    ],
}

In keybindings.json, I have

    {
        "key": "ctrl+alt+v",
        "command": "extension.multiCommand.execute",
        "args": {
            "command": "multiCommand.toggleVim"
        },
    },

I expect vim to toggle. However, nothing happens to vim and only the activity bar gets toggled. On the other hand, I do see that the mode changes from --NORMAL-- to -- VIM: DISABLED -- and vice versa, but nothing happens to the key bindings.

If I remove "workbench.action.toggleActivityBarVisibility" from the sequence, then vim mode toggles as expected.

ryuta46 commented 4 years ago

@lk-hang I tried.

When the vim mode is VIM: DISABLED, your command multiCommand.toggleVim works fine for me. It means the vim mode switched to NORMAL and the activity bar visibility switched.

But when the vim mode is NORMAL, multiCommand.toggleVim didn't work. Activity bar visibility switched but the vim mode is displayed as VIM: DISABLED and then I typed something, it switched to NORMAL unexpectedly.

I tried only with Vim extension ( not with multi-command extension ) and I found that toggling activity bar visiblity with command workbench.action.toggleActivityBarVisibility or menu bar causes switching vim mode to NORMAL when the vim mode is VIM: DISABLED

I think this behavior is not related with multi-command extension. Could you report this behavior in vim extension github if you feel inconvinience?

Thanks.