0

I am trying to close the active editor tab when pressing a key like "c" to close the active tab.

Tried the following element in my keybindings.json

    {
        "key": "c",
        "command": "workbench.action.closeActiveEditor",
        "when" : "normalVimMode"
    }

But this also closes the tab when i am in edit mode. Any clue how this can be achieved?

Marco
  • 15,101
  • 33
  • 107
  • 174

1 Answers1

0

Add the following snippet to settings.json solves my problem:

    "vim.normalModeKeyBindingsNonRecursive": [
        {
            "before": ["c"],
            "commands": [
                "workbench.action.closeActiveEditor"
            ]
        }
    ]

Marco
  • 15,101
  • 33
  • 107
  • 174