sublime_merge
sublime_merge copied to clipboard
No subword navigation in commit message input field and command palette
Version info
- OS: Kubuntu 22.04
- Build: 2076
Description
Navigating in a string (like this_is_a_test_string ) is not possible in commit message and command palette input fields with alt+right/left, instead it performs the default navigate_back/navigate_forward commands in the background.
alt+shift+right/left for selection of subwords albeit works. This is mainly why I consider it as bug, although I am not sure if this behavior has always been the case.
Expected behavior
In text inputs contexts the keybinding should be used for subword navigation, also to match Sublime Texts behavior.
Best case would be to have contexts for the edit commit message input and command palette that key bindings like that would work (not sure about the overlay_has_focus, but I think in ST this would be the solution):
{
"keys": ["alt+left"],
"command": "move",
"args": {"by": "subwords", "forward": false} ,
"context": [{ "key": "overlay_has_focus", "operator": "equal", "operand": true }],
},
@themilkman, I think this is the right workaround:
Default.sublime-keymap:
[
{
"keys": ["alt+left"],
"context": [{ "key": "control", "operator": "equal", "operand": "text_control" }],
"command": "move",
"args": {"by": "subwords", "forward": false}
},
{
"keys": ["alt+right"],
"context": [{ "key": "control", "operator": "equal", "operand": "text_control" }],
"command": "move",
"args": {"by": "subword_ends", "forward": true}
},
]
Thank you very much @srbs, this seems to work