question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

VsCode mapping escape to kj directions unclear

See original GitHub issue

Keymaps.json should be:

[
    {
        "command": "vscode-neovim.compositeEscape1",
        "key": "k",
        "when": "neovim.mode == insert",
        "args": "k"
    },
    {
        "command": "vscode-neovim.compositeEscape2",
        "key": "j",
        "when": "neovim.mode == insert",
        "args": "j"
    }
]

for mapping kj to esc, instead of having the kk map be composite 2 and jj map being composite 1, as shown in the plugin description, shown below:

Enabling jj or jk as escape keys from the insert mode Put into your keybindings.json:

for jj

{
    "command": "vscode-neovim.compositeEscape1",
    "key": "j",
    "when": "neovim.mode == insert",
    "args": "j"
}

to enable jk add also:

{
    "command": "vscode-neovim.compositeEscape2",
    "key": "k",
    "when": "neovim.mode == insert",
    "args": "k"
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
oreskcommented, Jun 5, 2020

I’ve just installed the plugin 5 min ago. Was using vim extension before.

Honestly I had no idea why does adding a k k shortcut end up with getting j k being another exit, and thought the instructions had a typo.

I usually use jj or kk to exit the insert mode.

0reactions
theol0403commented, Apr 28, 2022

Duplicate of #563. Refactoring the jk logic should come with more clear instructions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

VsCode mapping escape to kj directions unclear #245 - GitHub
I've just installed the plugin 5 min ago. Was using vim extension before. Honestly I had no idea why does adding a k...
Read more >
how do i change escape vim key binding to jk or something ...
To do that Press F2 or Ctrl+Shift+P to open vscode commands enter image description here ... This code is mapping jk as ....
Read more >
A improved mapping to leave insert mode than jk or kj or jj : r/vim
Remap caps lock as escape, use the default escape with a better key placement.
Read more >
Visual Studio Code Key Bindings
Here you will find the complete list of key bindings for Visual Studio Code and how to change them.
Read more >
Other ways to exit Insert mode besides Escape
1. You can map any key combination anywhere, and you can't do quite anything else. Is that what you mean? · 17. Learned...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found