-
-
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
Arrow key bindings not working with insertModeKeyBindings #2924
Comments
Note: the configuration also does not work with |
cc @jpoon |
I reworked the remapper so that it more accurately matches keys to possible remaps and disabled recursive remappings (see This problem does not seem to present when using non-recursive bindings however. I'm not sure then how to proceed: should we remove recursive keybindings for insert mode and other modes if the same problem exists there when switching between modes mid remap, or should we chase this bug further? Edit: I may have broken some other parts of the remap handling, but for now I still think it highlights a deeper issue. |
the easy workaround is uing the default up down of vscode's shortcut setting( ctrl+k+s ), it is overrided by vim after install
|
Thanks for the tip @metasong. I've given it a shot, but it has a critical problem with it: It escapes from autosuggest boxes. Here's a gif: |
@xmbhasin I suppose the status of your work on this issue hasn't changed, right? Your commits reworked the remapper, but revealed another deeper issue? And then you had this open question.
Can a maintainer weigh in here? Maybe @jpoon? |
I think I may have come up with a fixed version of @metasong's keybindings (fixing the problem of escaping the autocomplete / suggest widget), based on the It looks like this: {
"key": "up",
"command": "cursorUp",
"when": "editorTextFocus && vim.active && !inDebugRepl && vim.mode == 'Insert' && !suggestWidgetMultipleSuggestions && !suggestWidgetVisible"
},
{
"key": "down",
"command": "cursorDown",
"when": "editorTextFocus && vim.active && !inDebugRepl && vim.mode == 'Insert' && !suggestWidgetMultipleSuggestions && !suggestWidgetVisible"
} This doesn't need any changes to settings. I will start using this and see if there are any other problems (including performance issues) with it. Edit: Performance is great, much better than the original method. |
@jpoon this is indeed now working! Will close this issue. For everyone else, the original method of setting Compare this to the speed of rebinding the keybindings, which is as fast as VS Code normally is: |
Switch to keybindings instead of settings Ref: VSCodeVim/Vim#3623 Ref: VSCodeVim/Vim#2924 (comment)
* Document display line moving best practices To vertically move to wrapped lines when word wrap is on. Ref: #2403 (comment) Ref: #2924 (comment) * Remove extra line * Disable Prettier formatting on code block
Okay, here is the step by step solution folks:
EDIT
|
In case, like for me, vscode doesn't allow you to edit the when expression of a system keybinding, you can insert the following in
|
Describe the bug
The configuration for navigation with arrow keys across word wrapped lines from #2403 (comment) no longer works.
Bonus: The configuration does work with a separate, unrelated configuration.
To Reproduce
Steps to reproduce the behavior:
"editor.wordWrap": "on"
)broken.json
belowctrl+o
and<C-o>
do not work)working.json
belowbroken.json
working.json
Expected behavior
The configuration should work in both cases (not only with the extra j => Esc configuration key).
Logs
Broken:
Working:
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: