question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot remap <C-e> in insert mode

See original GitHub issue

Describe the bug The following setting has no effect:

"vim.insertModeKeyBindingsNonRecursive": [
    {
        "before": ["<C-e>"],
        "after": ["<esc>"]
    }
],

(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 pressing C-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):

  • Extension (VsCodeVim) version: 0.16.12
  • VSCode version: 1.29.1
  • OS: Windows 10.0.15063

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).

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:18 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
janhesterscommented, Dec 24, 2018

Same behavior. I tried to remap:

"vim.insertModeKeyBindingsNonRecursive": [{ "before": ["<C-o>", "$"], "after": ["<C-e>"] }]

Apparently there is trouble with remapping ctrl commands in general.

See here for the parent issue. See here for a possible workaround.

2reactions
insidewhycommented, Mar 1, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to remap <c-e> in insert mode? : r/neovim - Reddit
I want to be able to jump to the end of the line while I'm in insert mode: local map = vim.api.nvim_set_keymap map('i',...
Read more >
Vim remapping ctrl in Insert mode - Stack Overflow
imap stands for Insert mode, <C-e> is the Ctrl + e and Esc + a is the action to perform. You can add...
Read more >
Two character remap sometimes failing in INSERT mode
The options 'timeout' and 'timeoutlen' control how Vim will treat typed characters when they are part of a mapping.
Read more >
map.txt - Vim
Example of using <Cmd> halfway Insert mode: nnoremap <F3> aText <Cmd>echo ... This is because Vim cannot know if the next character will...
Read more >
Mastering Key Bindings in Emacs
For instance, the key f is bound to self-insert-command , a special command ... of remapping in use, see fixing the mark commands...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found