-
-
Notifications
You must be signed in to change notification settings - Fork 198
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
feat(bindings)!: enable bindings through configuration #1558
feat(bindings)!: enable bindings through configuration #1558
Conversation
I want to complete the restart feature and handle viewport synchronization in the 1.0.0 release. Currently waiting for this PR 😄 |
"uniqueItems": true, | ||
"items": { | ||
"type": "string", | ||
"enum": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a lot of other possibilities here, like :1234567890,.\ and space/pgup/pgdown/esc. Do you think it is worth it to include more?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We only need to define the relatively common ones. This configuration option itself is for auxiliary purposes, so it’s fine to have a little more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the purpose of this PR to simplify passing through additional bindings to nvim? Then we might want to consider ALT bindings too.
The Ctrl shortcut key is the most commonly used and many users will customize it. As for the Alt shortcut key, I believe very few people will use it. If someone needs it, they can honestly define their own keybindings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While you're here, can you remove the space in the script file names. Just do 2_normal_mode.cjs
etc.
adcb6f5
to
2c70580
Compare
@theol0403 By the way, may I ask how you make this kind of commit? It seems like you are just correcting previous commits. |
@xiyaowong I made a mistake when merging your API PR, and release-please didn't pick up that change, to put into the changelog. So I just created an empty commit so that release-please would see the change. |
I’ve learned something new. |
This PR aims to help users customize keyboard shortcuts more easily. Additionally, it makes maintenance easier by using scripts to generate keybindings.
Breaking changes:
Due to the changes in the "when" expression, the previous method of removing the keybinding will not work. e.g.
Configuration
Deprecated:
useCtrlKeysForNormalMode
useCtrlKeysForInsertMode
New:
ctrlKeysForNormalMode
ctrlKeysForInsertMode
editorLangIdExclusions
e.g.
vscode-neovim.ctrlKeysForNormalMode: ["a", "b", "up"]
, this enables<C-a>
<C-b>
<C-up>
in non-insert mode