Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow simplified keybinding syntax in settings.json #1667

Closed
jacobdufault opened this issue May 7, 2017 · 1 comment
Closed

Allow simplified keybinding syntax in settings.json #1667

jacobdufault opened this issue May 7, 2017 · 1 comment

Comments

@jacobdufault
Copy link

  • Click thumbs-up 馃憤 on this issue if you want it!
  • Click confused 馃槙 on this issue if not having it makes VSCodeVim unusable.

The VSCodeVim team prioritizes issues based on reaction count.


FEATURE REQUEST

Right now, adding a keybinding to vim.otherModesKeyBindingsNonRecursive is very verbose (especially when adding 5-6 of them). For example,

"vim.otherModesKeyBindingsNonRecursive": [
    {
      "before": ["g", "r"],
      "after": [],
      "commands": [
        {
          "command": "editor.action.referenceSearch.trigger",
          "args": []
        }
      ]
    }
]

Some extra fields can be emitted and this can be collapsed to

"vim.otherModesKeyBindingsNonRecursive": [
    {
      "before": ["g", "r"],
      "commands": [
        {
          "command": "editor.action.referenceSearch.trigger"
        }
      ]
    }
]

but that is still very verbose. It'd be really nice if there was support for a "command" property which would make it less verbose, ie,

"vim.otherModesKeyBindingsNonRecursive": [
    {
      "before": ["g", "r"],
      "command": "editor.action.referenceSearch.trigger"
    }
]

Thanks!

@jpoon
Copy link
Member

jpoon commented Jun 17, 2018

You can omit the empty arguments. However, in order to support multiple commands, we need for them to be in an array. You can however, put it all in one line if that makes it more neater...

"vim.otherModesKeyBindingsNonRecursive": [
    {
        "before": ["Z", "Z"],
        "commands": [ {"command": ":wq" } ]
    }
],

@jpoon jpoon closed this as completed Jun 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants