You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you move between lines using the arrow keys in insert mode, you can end up with code corruption (#2580) due to LSP autocompletion kicking in (#2027)
The easiest way to avoid this problem would be to limit the keybindings for navigating the autocompletion drop-down to tab and shifttab. In other words, to disallow the use of the up and down arrows on the autocompletion drop-downs.
The other solution
The only other way I can see of addressing this problem is to make it so that Helix automatically enters normal mode when the person uses the up or down arrow keys in insert mode.
Given save points are only registered at the end of an insert session, this might actually be a safer mode of operation.
The text was updated successfully, but these errors were encountered:
aral
changed the title
Make tab and shift-tab the only way to navigate autocompletion drop downs to avoid code corruption issues in insert mode
Make tab and shift-tab the only way to navigate autocompletion drop downs or make arrow keys exit insert mode to avoid code corruption issues in insert mode
May 27, 2022
aral
changed the title
Make tab and shift-tab the only way to navigate autocompletion drop downs or make arrow keys exit insert mode to avoid code corruption issues in insert mode
Make tab and shift-tab the only way to navigate autocompletion drop downs or make arrow keys exit insert mode to avoid code corruption issues
May 27, 2022
You can disable the arrow keys in insert mode so they do nothing:
[keys.insert]
right = "no_op"left = "no_op"up = "no_op"down = "no_op"
Or to switch into normal mode:
[keys.insert]
right = "normal_mode"left = "normal_mode"up = "normal_mode"down = "normal_mode"
Though rebinding these doesn't affect their behavior in the completion menu.
I would be in favor of removing up/down keys from the completion menu's keymap. I think the keymap could do with fewer arrow-key bindings in general. C-n and C-p are also available so it wouldn't be only tab and shift+tab.
Having the default keymap automatically enter normal mode on arrow key presses could be a good way to train people to not use arrow keys in insert mode but it would be unexpected behavior I think. IIRC even vim leaves those keybindings for motion.
If you move between lines using the arrow keys in insert mode, you can end up with code corruption (#2580) due to LSP autocompletion kicking in (#2027)
The easiest way to avoid this problem would be to limit the keybindings for navigating the autocompletion drop-down to tab and shifttab. In other words, to disallow the use of the up and down arrows on the autocompletion drop-downs.
The other solution
The only other way I can see of addressing this problem is to make it so that Helix automatically enters normal mode when the person uses the up or down arrow keys in insert mode.
Given save points are only registered at the end of an insert session, this might actually be a safer mode of operation.
The text was updated successfully, but these errors were encountered: