-
Notifications
You must be signed in to change notification settings - Fork 44
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
Add configuration to provide custom keybindings #74
Add configuration to provide custom keybindings #74
Conversation
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.
First pass on code only.
I would go ahead and drop node 12, it is EOL. Let's add node 16 or 18 to the matrix instead. |
Looking at Node.js 18 build failure, maybe we should try with 16 for now? |
Looks like node 16 works, thanks for the commit! |
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.
Thank you @peytondmurray.
Summary
This PR allows the user to configure custom Vim-mode keybindings using the advanced settings editor, closing #43.
@mlucool I tested binding
m
in normal mode to:noh<CR>
, and that seems to work. CodeMirror cannot fully emulate Vim, and many keys will collide with browser or JupyterLab keybindings, so for example if you try to bind a command to<Ctrl-/>
it will not work. In any case marks are not supported in CodeMirror som
in normal mode should work just fine.Changes
additionalProperties
tofalse
inplugin.json
- it isn't being used hereupdateSettings
which deals with registering/unregistering commands, updating the tracker, and callingmodifyCell
to make it a bit simpler. This resolves a bug where the first call toupdateSettings
would succeed, but any subsequent call would not because it would try to re-register commands that were already registered.jq
(to automatically remove trailing,
without me having to deal with it) which resulted in some reformatting ofplugin.json
. If this is a problem I can undo the reformatted lines.