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

Ctrl-[ does not act as escape #16

Closed
byronclark opened this issue Jun 16, 2022 · 3 comments
Closed

Ctrl-[ does not act as escape #16

byronclark opened this issue Jun 16, 2022 · 3 comments

Comments

@byronclark
Copy link

byronclark commented Jun 16, 2022

Issue: Instead of acting as an escape key, Ctrl-[ decreases the indent level.

Observed in:

As far as I can tell this only happens on Linux and Windows. MacOS is unaffected.

@byronclark
Copy link
Author

I see that the binding is present in the code: https://github.com/replit/codemirror-vim/blob/master/src/vim.js#L76

@byronclark
Copy link
Author

I believe the issue is that the key is overridden by the CodeMirror defaultKeyMap which is usually loaded after starting vim().

https://github.com/codemirror/commands/blob/main/src/commands.ts#L876

  {key: "Mod-[", run: indentLess},
  {key: "Mod-]", run: indentMore},

@nightwing
Copy link
Collaborator

This was fixed by the linked pull request. Thank you for the report.

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

No branches or pull requests

2 participants