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.

odd default <Esc> key binding

See original GitHub issue

This extension is great. I like that I can use real vim while interfacing w/ VS Code but I had a difficult time figuring out how to exit insert mode because the Escape key does nothing by default. The Ctrl + C mentioned in the README.md did not pop out at me when I was reading about the extension and it took a while to figure out how to add the Escape key binding.

I’m curious, why bind Ctrl + C to <Esc> rather than binding Escape to <Esc>? I ended up working around this by adding this to my keybindings:

    {"key": "Escape", "command": "vscode-neovim.escape" }

I figure there’s probably a good reason why you did not use the default key for <Esc> I’m just curious as to why.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:12
  • Comments:19 (6 by maintainers)

github_iconTop GitHub Comments

6reactions
Dreomitecommented, Dec 9, 2019

A little off-topic, but these should probably be added as well:

  {
    "key": "ctrl+n",
    "command": "selectNextSuggestion",
    "when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus"
  },
  {
    "key": "ctrl+p",
    "command": "selectPrevSuggestion",
    "when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus"
  },
  {
    "key": "ctrl+n",
    "command": "workbench.action.quickOpenSelectNext",
    "when": "!editorFocus"
  },
  {
    "key": "ctrl+p",
    "command": "workbench.action.quickOpenSelectPrevious",
    "when": "!editorFocus"
  }

So I can use ctrl+n & ctrl+p for selecting code suggestions and to select options in ctrl+p-derived menus.

6reactions
prodehghancommented, Dec 9, 2019

@docwhat A better keybinding is:

[
    {
        "key": "Escape",
        "command": "vscode-neovim.escape",
        "when": "editorTextFocus && neovim.mode != normal"
    }
]

Pressing Esc in any mode other than “normal” should take us out of that mode.

Read more comments on GitHub >

github_iconTop Results From Across the Web

odd default <Esc> key binding · Issue #74 · vscode-neovim ...
I like that I can use real vim while interfacing w/ VS Code but I had a difficult time figuring out how to...
Read more >
Weird esc key binding - Warframe Forums
I have a weird problem. Whenever I hit Esc key to back out of a menu, it opens chat, enters a macro from...
Read more >
Can't restore default control options, can't rebind escape key ...
I made the mistake of accidentally unbinding the escape key. This has, in effect, made the game unplayable as now attempting to bind...
Read more >
How to bind ESC to keyboard-escape-quit in Emacs?
Is it possible to rebind it to a single Esc ? I never use Escape as a prefix key. I'm running Emacs 23.0.60.1...
Read more >
Key Mapping of ESC key problem - General Discussion
I've binded all my controls to my t16000 hotas with no problem. Except for the ESC key which I bind to a joystick...
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