Vim: Mapping "jk" to "<Esc>" in insert mode doesn't work after pressing "c"

Created on 5 Oct 2018  路  2Comments  路  Source: VSCodeVim/Vim

Describe the bug
My <Esc> key is mapped to jk and it works fine in many cases but when I select some text and type c to change the selected text, mapping jk to <Esc> in insert mode doesn't work.

To Reproduce
Steps to reproduce the behavior:

settings.json

    "vim.insertModeKeyBindings": [
        {
            "before": ["j", "k"],
            "after": ["<Esc>"]
        }
    ]
  1. Select some text in normal mode
  2. type c to delete the selected text and enter insert mode
  3. type jk
  4. See error: mapping jk to <Esc> in insert mode doesn't work
  5. If you type <Esc>, vim will exit insert mode and enter normal mode.

Expected behavior
Mapping jk to <Esc> in insert mode should work all the time.

Environment (please complete the following information):

I test this operation in both macOS and windows and see the same error.

  • Extension (VsCodeVim) version: 0.16.6
  • VSCode version: 1.27.2
  • OS: macOS Mojave 10.14 / windows 7
statuduplicate

Most helpful comment

This sounds like a duplicate of #3088. This was fixed with #3090, which has been merged and is waiting release.

All 2 comments

This sounds like a duplicate of #3088. This was fixed with #3090, which has been merged and is waiting release.

duplicate of #3088

will try to get a release out tonight

Was this page helpful?
0 / 5 - 0 ratings

Related issues

st-schneider picture st-schneider  路  3Comments

AndersenJ picture AndersenJ  路  3Comments

stefanoio picture stefanoio  路  3Comments

spinningarrow picture spinningarrow  路  3Comments

ghost picture ghost  路  3Comments