Skip to content
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

Is it possible to rebind what e key does in normal mode to do yank instead? #5321

Open
nikitavoloboev opened this issue Oct 2, 2020 · 7 comments

Comments

@nikitavoloboev
Copy link

I want to rebind e key in normal mode to instead of going to end of word, to do copy or yank in vim terms.

Is it possible to do?

@dobrovolsky
Copy link

You can try add something like this to your settings.json

"vim.normalModeKeyBindingsNonRecursive": [
    {
      "before": ["e"],
      "after": ["y", "i", "w"]
    }
]

@nikitavoloboev
Copy link
Author

Both your suggestion and this:

  "vim.normalModeKeyBindings": [
    {
      "before": ["e"],
      "after": ["y"]
    },

Didn't work for me. It still did what e does, go to end of word.

@berknam
Copy link
Contributor

berknam commented Oct 7, 2020

Can you give more information about your system, vscode and extension versions?

Both the remaps above should work. Are you trying to switch those two keys? Do you have some other remap for y?

@glm4610
Copy link

glm4610 commented Nov 11, 2020

Maybe unrelated, but this workaround fixed some problems I had after remapping some keys around:

Workaround to switch VS Code to dispatch based on key code again. Add the following setting:
"keyboard.dispatch": "keyCode" and restart VS Code

See also:

microsoft/vscode#23991

@J-Fields
Copy link
Member

@nikitavoloboev Is this still an issue you're having?

@nikitavoloboev
Copy link
Author

@J-Fields Yes, still an issue for me as @dobrovolsky solution didn't work for me.

@J-Fields
Copy link
Member

J-Fields commented Mar 1, 2021

@nikitavoloboev Can you please post your settings? What does e do after creating a remapping?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants