-
Notifications
You must be signed in to change notification settings - Fork 30
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
Keybindings with Option key on Mac are not working #193
Comments
Currently we are following macvim behavior on mac. That is, you can do |
I wasn't comparing with vim/neovim, but with codemirror with vim keymap running on linux box. What I didn't think about was to check on actual vim, and you're right, the behaviour between linux and mac is different: on linux a map using So I guess if consistency with the vim implementation is what you're looking for, which makes sense, this is not a bug. Feel free to close the issue, I leave it open just to hear your opinion. Thx a lot! |
Attached pull request allows to use |
Thx a lot for the PR, I've tested and it works great, but I've also noticed something a little bit off: the keybinding gets detected both in normal and insert modes, but when in insert mode, it exits back to normal mode, not sure that's the expected behaviour. |
Thank you for testing. The demo has a code to toggle vim with alt-v keybinding, for testing, this won't happen in normal usage. |
I've been having this issue where if I define a custom key binding for an action (i.e Option+v) that uses the Option key on mac (the example would translate to
<A-v>
, the key binding does not work.After having a look to the code, I've found this is the cause of the issue:
codemirror-vim/src/vim.js
Lines 1149 to 1154 in 160a7fd
The combination gets transformed in order to support international characters, but it breaks this kind of key combinations.
One workaround, which is not ideal, specially for potential side effects, is to make CodeMirror believe you're not actually on a Mac:
with this, the keybinding works as expected, but of course, I'm not able to write international characters anymore.
The text was updated successfully, but these errors were encountered: