-
-
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
InsertMode binds with<C-Key> in settings.json doesn't work. #3126
Comments
I have a similar problem: setting:
Caused the cursor to move correctly, but |
Faced the same issue. "vim.insertModeKeyBindings": [
{ "before": ["<C-e>"], "commands": ["cursorLineEnd"] }
] If I press If I press it two times in a row, the mappings looks to be found, but nothing happens with the cursor, the standard Ctrl+e behavior is still triggered (copying characters from the line below). Here's the console output:
|
Describe the bug
Bind combinations of Control + key in settings.json when Insert mode is active (vim.insertModeKeyBindings) writes the textkeys instead doing the "keypress".
To Reproduce
Steps to reproduce the behavior:
Edit settings.json, useCtrlKeys should be true.
Add those keybindings
{ "before": [ "<ctrl-a>" ], "after": [ "<Esc>", "I" ] }
{ "before": [ "<ctrl-e>" ], "after": [ "<Esc>", "A" ] }
Open file , start insert mode then press Control-A , it should go to start-of-line, or with Control-E should go to end-of-line
Cursor doesnt move, just writed some characters (from copy register i think)
Expected behavior
Would be fine the possibility to add those bindings in settings.json , i finally made it working editing keybindings.json.
{
"key": "ctrl+e",
"command": "cursorEnd",
"when": "editorTextFocus && vim.active && !inDebugRepl && vim.mode == 'Insert'"
},
{
"key": "ctrl+a",
"command": "cursorHome",
"when": "editorTextFocus && vim.active && !inDebugRepl && vim.mode == 'Insert'"
}
Thanks!
The text was updated successfully, but these errors were encountered: