-
-
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
Keybindings with Alt modifier. #2713
Comments
We support this already. Have you tried using the |
Here's what i have tried. This setting seems to have no effect. : "vim.otherModesKeyBindingsNonRecursive": [
{
"before": ["alt+v"],
"after": ["V"]
}
], It appears to not capture the alt key at all. When i try to bind any other alt combination like "alt+x", or just "alt" to any other command like so: "vim.otherModesKeyBindingsNonRecursive": [
{
"before": ["alt+x"],
"after": [],
"commands": [
{
"command": "workbench.action.showCommands",
"args": []
}
]
}
] It also wouldn't work. Using other modifier keys like "<c-x>" worked. Here are some options in my configuration that may me worth mentioning: "window.menuBarVisibility": "hidden",
"window.enableMenuBarMnemonics": false, EnvironmentVSCode version: 1.24.0 |
I have the same issue on Linux (arch). Enabling debugging, I can see that keys using the alt modifier are not captured at all, i.e. does not print any |
Same issue on Linux (ubuntu)
Environment
|
I was mistaken. We don't bind to |
Is this something that can be implemented? |
Bump. Any chance of implementing this? My leader key is usually alt-space, which lets me use it in any mode, including insert mode, and even outside the editor. |
+1 |
I have the exact need. |
The problem with binding to If we bound to those key combos we would enter in conflict with the commands of those other extensions. This would happen even if the user wasn't using those key combos for any remap. It might be possible to only bind to those key combos when a remap that uses it is configured. But it would still conflict if there was the same key combo being used by another extension. For now as a workaround for moving lines with {
"key": "alt+j",
"command": "editor.action.moveLinesDownAction",
"when": "editorTextFocus && !editorReadonly && vim.active"
},
{
"key": "alt+k",
"command": "editor.action.moveLinesUpAction",
"when": "editorTextFocus && !editorReadonly && vim.active"
}, |
@berknam hmm. makes sense. I have added the above custom keyboard shortcuts and they gel nicely. thanks. |
We should probably provide bindings like these but set their default values in |
That's a great option! Should be simple enough to do. |
I came here one year ago, and yet it's still the reason rejecting me from VSCode.... :( |
One year is relative small amount of time for Microsoft ) |
Wait for VSCodeVim/Vim#2713 to work.
This feature is so important. Being able to remap |
Update vimrc to try to get vscode to use my mappings for switching splits (alt + i/j/k/l). Unfortunately, it doesn't work, because vscode doesn't handle mappings that use alt. See: VSCodeVim/Vim#2713 TODO: try to figure out a workaround; maybe see the above thread for ideas.
Hello, friends. |
Yeah this is a glaring hole in the space of useful mod keys. I would happily toss out all the other conflicting extensions (insofar as i understand @berknam ) if that would give me the Alt key for binding. Is there chance you can add "hard-override"? |
i actually have the inverse, after re-installing vscode from scratch vim intercepts alt+shift and i dont see any way to disable this. ie alt+shift+up\down |
Well, I come here again, and finally find out that 5 years later, eventually it had been fixed : Remapping more complex key combinations! |
This also works on mac at least
|
FEATURE REQUEST
I would like to be able to bind key sequences with alt to vim keys, specifically Alt + v to V like so:
{ "before": [ "alt+v" ], "after": [ "V" ], },
Would this be hard to implement ?
The text was updated successfully, but these errors were encountered: