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

VSCodeVim not picking up some bindings from .vimrc #5067

Closed
sangonzal opened this issue Jul 22, 2020 · 2 comments · Fixed by #4735
Closed

VSCodeVim not picking up some bindings from .vimrc #5067

sangonzal opened this issue Jul 22, 2020 · 2 comments · Fixed by #4735

Comments

@sangonzal
Copy link

Describe the bug
I'd like to remap oo to o<Esc>k and OO to O<Esc>j. I have this mapping set on a .vimrc file as

  • nmap oo o<Esc>k
  • nmap OO O<Esc>j

I've set "vim.vimrc.enable": true in settings.json, and although it's picking up most of the .vimrc, its not picking up this mapping. I've also tried to set the binding on settings.json:

    "vim.vimrc.enable": true,
    "vim.useSystemClipboard": true,
    "vim.normalModeKeyBindingsNonRecursive": [
        {
            "before": ["o", "o"],
            "after": ["o", "<Esc>", "k"]
        },
        {
            "before": ["O", "O"],
            "after": ["O", "<Esc>", "j"]
        }
    ],

Expected behavior
Expect to insert new line, and exit inset mode.

  • Extension (VsCodeVim) version: 1.16.0
  • VSCode version: 1.47
  • OS: Windows 10

Additional context
I'm new to both vscode and vim, so it might not be configured correctly on my part, but have not been able to find any documentation that has helped.

@sql-koala
Copy link
Contributor

These kinds of mapping ( two keys, where the first is not: leader, g, z) don't work right now.
You will have to wait a bit for this PR:
#4735

leader+j and leader+k would work, I think thats in one of Tpope's config.

@berknam berknam mentioned this issue Jul 22, 2020
10 tasks
@sangonzal
Copy link
Author

I see. Thanks for clarifying, I'll be on the lookout for when that PR gets merged.

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.

2 participants