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

Keybindings with space don't seem to work #2039

Closed
treed opened this issue Sep 25, 2017 · 4 comments
Closed

Keybindings with space don't seem to work #2039

treed opened this issue Sep 25, 2017 · 4 comments

Comments

@treed
Copy link

treed commented Sep 25, 2017

  • 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.


Is this a BUG REPORT or FEATURE REQUEST? (choose one):

Environment:

  • VSCode Version: 1.16.1
  • VsCodeVim Version: 0.10.1
  • OS: Ubuntu Linux 14.04

What happened:

I tried to add several keybindings that use the space bar as a sort of leader. I tried using "space", "", " " followed by various keys. As an example:

        {
            "before": ["<space>", "p"],
            "after": [],
            "commands": [
                {
                    "command": "workbench.action.showCommands",
                    "args": []
                }
            ]
        },

Rather than activating the command, it appears to just accept space and p as independent things.

What did you expect to happen:

I expected it to invoke the command.

How to reproduce it:

Try putting the above example in your config, and activating it.

As a workaround, if I map leader to " ", then I can use leader. When I've done this in the past in vim, however, plugins tend to trample all over my own bindings, so I use this method instead. If VSCodeVim doesn't trample as badly, then this workaround will probably be fine, but this still feels like a bug worth investigating.

@Chillee
Copy link
Member

Chillee commented Sep 26, 2017

@treed I assume you're talking about vim plugins trampling over your own leader bindings within vim? If so, I doubt it'll be as much of an issue. I don't think we provide any default leader bindings except those for easymotion (and I don't think those apply if easymotion is turned off).

@treed
Copy link
Author

treed commented Oct 4, 2017

Yeah, I haven't had any trouble with trampling while using leader here, which is good, but it still seems like a problem worth looking into, if not particularly high priority.

(Sorry I didn't reply sooner, I thought I had.)

@jpoon
Copy link
Member

jpoon commented Jun 15, 2018

Ultimate reasoning is explained here #2584 (comment).

Going to close this issue and use #2584 to track.

@jpoon jpoon closed this as completed Jun 15, 2018
@jpoon
Copy link
Member

jpoon commented Jun 19, 2018

I took a closer look at the code. I was wrong, we do normalize all the keys. This key mapping works....

  "vim.insertModeKeyBindings": [
    {
        "before": ["<space>", "p"],
        "commands": [
            {
                "command": "workbench.action.showCommands",
            }
        ]
    },
  ],

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants