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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camel case motion breaks some leader+key+key combinations #4563

Closed
Peluko opened this issue Feb 19, 2020 · 5 comments · Fixed by #4735
Closed

Camel case motion breaks some leader+key+key combinations #4563

Peluko opened this issue Feb 19, 2020 · 5 comments · Fixed by #4735

Comments

@Peluko
Copy link

Peluko commented Feb 19, 2020

Describe the bug
When "vim.camelCaseMotion.enable": true, some leader+key+key combinations won't work. I use them for Spacemacs emulation. For example:

    "vim.normalModeKeyBindingsNonRecursive": [
        {
            "before": [
                "<leader>",
                "b",
                "b"
            ],
            "after": [],
            "commands": [
                {
                    "command": "workbench.action.showAllEditors",
                    "args": []
                }
            ]
        },
    ],

won't work, although

    "vim.normalModeKeyBindingsNonRecursive": [
        {
            "before": [
                "<leader>",
                "b"
            ],
            "after": [],
            "commands": [
                {
                    "command": "workbench.action.showAllEditors",
                    "args": []
                }
            ]
        },
    ],

Works flawlessly and

    "vim.normalModeKeyBindingsNonRecursive": [
        {
            "before": [
                "<leader>",
                "p",
                "b"
            ],
            "after": [],
            "commands": [
                {
                    "command": "workbench.action.showAllEditors",
                    "args": []
                }
            ]
        },
    ],

also works. It only happens with some leader plus two keys combinations. For example, any leader+b+key or leader+e+key combinations won't work, but leader+p+key or leader+t+key works perfectly.

  • Extension (VsCodeVim) version: 1.12.4
  • VSCode version: 1.42.1
  • OS: Windows 10 Pro 1909
@sql-koala
Copy link
Contributor

Hi,
this is a more general case. AFAIK, vscodevim keybindings need to be 100% percent unambigous. Meaning: when camelcase-motion uses "leader b", then there can't be other two char keybindings that start with "leader b".
I don't know if there are plans to support that, but my guess is you would have to wait quiet some time.

@J-Fields
Copy link
Member

AFAIK, vscodevim keybindings need to be 100% percent unambigous

I believe this is correct. I've been meaning to dig into it for a while now, but I'm mostly unfamiliar with the relevant part of the code base.

@sql-koala
Copy link
Contributor

PS: notice it is not just 100% unambigous, but 100% percent :D

@Peluko
Copy link
Author

Peluko commented Feb 21, 2020

Any easy way to remap camel case keys?

@bangedorrunt
Copy link

i got exactly the same problem. hope it will be fixed soon!

@berknam berknam mentioned this issue May 19, 2020
10 tasks
J-Fields pushed a commit that referenced this issue Aug 16, 2020
This is a pretty massive change; see pull request #4735 for full details

Most notably:
- Support for operator-pending mode, including remaps and a half-cursor decoration
- Correct handling of ambiguous remaps with timeout
- Correct handling of recursive special case when the RHS starts with the LHS
- Correct handling of multi-key remaps in insert mode
- Failed movements that occur partway through a remap stop & discard the rest of the remap
- Implement `unmap` and `mapclear` in .vimrc

Refs #463, refs #4908
Fixes #1261, fixes #1398, fixes #1579, fixes #1821, fixes #1835
Fixes #1870, fixes #1883, fixes #2041, fixes #2234, fixes #2466
Fixes #2897, fixes #2955, fixes #2975, fixes #3082, fixes #3086
Fixes #3171, fixes #3373, fixes #3413, fixes #3742, fixes #3768
Fixes #3988, fixes #4057, fixes #4118, fixes #4236, fixes #4353
Fixes #4464, fixes #4530, fixes #4532, fixes #4563, fixes #4674
Fixes #4756, fixes #4883, fixes #4928, fixes #4991, fixes #5016
Fixes #5057, fixes #5067, fixes #5084, fixes #5125
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

Successfully merging a pull request may close this issue.

4 participants