-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Cannot remap <C-e> in insert mode #3221
Comments
Same behavior. I tried to remap: "vim.insertModeKeyBindingsNonRecursive": [{ "before": ["<C-o>", "$"], "after": ["<C-e>"] }] Apparently there is trouble with remapping See here for the parent issue. |
The workaround is good, but it doesn't help in my case, as I use Ctrl-E to scroll in normal mode without moving the cursor, and not having that is much more annoying than not being able to bind it in insert mode. The I am not sure that the parent issue @janhesters listed applies to the behavior for |
Dupe of #3221 |
@jpoon: You marked this as a duplicate of itself -- did you make a typo? I'd like to follow the other issue. |
Oh crap. I'm on mobile. There's a PR that I just submitted and merged that fixed this issue. You can find the duplicate issue from there. Edit: dupe of #3126 |
Updated to 1.0.5 this morning and this is still not working for me. Or rather, it's working very inconsistently -- sometimes it works. I've only gotten it to work directly in the User Settings window and not in any other editor, even after reloading the window, and sometimes it just does nothing or copies the character on the line below (as it did before the change). Also, if I literally type I tried adding C-e explicitly to Here's my whole
|
Can you share your console logs? |
This works consistently for me.
similarly for insertModeKeyBindingsRecursive. |
We even have a test case testing this exact scenario :/ https://github.com/VSCodeVim/Vim/blob/master/test/configuration/remapper.test.ts#L304 |
I mapped it non-recursively, unlike your snippet or test case -- possible that has anything to do with it? I'll take a closer look on Monday if that isn't it. |
This morning I updated to 1.0.7, removed all VSCodeVim settings from my I'm not sure where to get the console logs you're talking about. |
|
The debug logs appear to reveal that there's a timing issue. In both of these cases I'm pressing
And here's where it doesn't:
Now that I've looked at those, I can confirm that if I wait a second or so after my last keystroke in insert mode, |
Any news on this? Just want to make sure you haven't forgotten about it since the status is still "closed". |
I'm hitting this issue also, it's very annoying but not quite as annoying as #3530 which I strongly suspect has the same cause as this. |
I'm seeing this issue as well:
With these settings,
|
Good place to debug the code is here if anybody wants to take a stab at it. Vim/src/configuration/remapper.ts Line 71 in 2e37f9d
|
I am still getting the same behavior I reported originally. VSCodeVim 1.11.3 and VSCode 1.40.2 now. I tried using both The current debug logs when I press When it doesn't work (I press them immediately in sequence):
When it does work (I wait a second in between presses):
(Edit: Just realized here I remapped C-e to C-o $ rather than to Escape as in the initial example. It behaves the same whether I remap to Escape or to this.) |
Describe the bug
The following setting has no effect:
(I don't actually want it to remap to just
<esc>
, but I'm starting simple.)To Reproduce
Add the above text to
settings.json
and save. Enter insert mode and try pressingC-e
. The character on the line below the current one is copied in -- rather than performing the mapped action of<esc>
.Expected behavior
VSCodeVim acts as if Escape was pressed.
Environment (please complete the following information):
Additional context
This does not appear to be a duplicate of Unable to remap
<C-s
> in insert mode. In that issue, the keys that people were trying to remap were not handled by VSCodeVim. In this case,<C-e>
is listed in packages.json, and VSCodeVim is doing something with the key (copying the character below the cursor).The text was updated successfully, but these errors were encountered: