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

<Esc> is recursively mapped for "vim.insertModeKeyBindingsNonRecursive" #1968

Closed
FallenMax opened this issue Aug 16, 2017 · 2 comments
Closed

Comments

@FallenMax
Copy link

FallenMax commented Aug 16, 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):

BUG REPORT

Environment:

  • VSCode Version: 1.15.0
  • VsCodeVim Version: 0.9.0
  • OS: macOS Sierra 10.12.6

What happened:

<Esc> is infinitely mapped for setting "vim.insertModeKeyBindingsNonRecursive"

What did you expect to happen:

<Esc> is mapped only once for setting "vim.insertModeKeyBindingsNonRecursive"

How to reproduce it:

  1. Open "user setting", add:
 "vim.insertModeKeyBindingsNonRecursive": [
    {
      "before": ["<Esc>"],
      "after": ["x","<Esc>"]   // <- 'x' is arbitrary character
    }]
  1. Open a blank document
  • press i (to enter Insert Mode)
  • press a, <Esc>
    • Expected: 'ax' (then exits to Normal Mode)
    • Actual: 'axxxxxxxxxx...' (keep inputing 'x, not exiting, need close file to cut it off )
  • Note:
    • VSCodeVim is likely to crash after doing this

aa

@rosshambrick
Copy link

A work-around for this:

    "vim.insertModeKeyBindingsNonRecursive": [
        {
            "before": [ "<Esc>" ],
            "after": [ "x", "ctrl+[" ]
        }
     ],

if you also use ctrl+[ you could also add a complementary mapping.

@jpoon
Copy link
Member

jpoon commented Dec 12, 2017

There was a regression with this merge commit way back when: d09722b#diff-1a1dc9b353e552d9f1994be988780695 which caused all the non-recursive keybindings to be recursive.

Will fix with this PR: #2208

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