Expose e/E (cursor_word_end) as customizable, unbound actions#233
Merged
Conversation
…d actions
Adds vim's `e`/`E` end-of-word motions as customizable actions in
query_normal mode. The actions are declared but left unbound by default
so they don't conflict with the existing `e` → focus_explorer binding in
the navigation context.
Users who want vim-style behavior can bind them in
`~/.config/sqlit/keymap.json`, e.g.:
{
"keymap": {
"action_keys": {
"query_normal": {
"cursor_word_end": "e",
"cursor_WORD_end": "E"
},
"navigation": {
"focus_explorer": "ctrl+e"
}
}
}
}
The motions themselves already work as operator suffixes (`de`, `ye`,
`ce`) via the existing motion registry; this just lets users use them
as standalone cursor motions too.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Vim's
eandEend-of-word motions weren't available as standalone cursor motions in the query editor — only as operator suffixes (de,ye,ce). Nakedein normal mode hits thefocus_explorerbinding from thenavigationcontext instead.This adds the two actions (
cursor_word_end,cursor_WORD_end) and allows them in query_normal mode, but leaves them unbound by default so the existinge → focus_explorerbehaviour is unchanged. Users who want vim-style motion can opt in via theirkeymap.json:{ "keymap": { "action_keys": { "query_normal": { "cursor_word_end": "e", "cursor_WORD_end": "E" }, "navigation": { "focus_explorer": "ctrl+e" } } } }(They'd also need to rebind
focus_exploreroff ofe, otherwise it would still win in the current binding-resolver order.)