feat: add Helix-based select mode and its most common keybindings #301
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.
Related to #299
This adds helix select mode inspired keybindings.
The just reuse existing commands and are defined as
helix: select
as opposed to existing other modes such askakoune: normal
etc. As far as I know, thekakoune
orhelix
part of the string is not used yet, but this could be useful in the future.By default, no keybinding is assigned to enter the new select mode from normal mode. Users need to assign one themselves (I assigned
v
to mine as Helix does, which is already used in dance/kakoune). Or they can just enter it via the VSCode command selection.Available commands in this mode are
esc
(return to normal mode),u s+u
undo/redo (same as normal mode), the selection changers:h j k l
moves (and left down up right arrow keys),w W e E
word moves,t T f F
seeks, andg
.It's pretty much the same as the normal mode when combining shift with any of these keys. Instead of shift, you hit
v
(or whatever you manually assigned) then make your selection by combining any of the keys mentioned, then return to normal mode with esc to then possibly act on your selection (or directly used
orc
, now handled from the select mode too)Note: this would be a breaking change for any user who defined their own "select" mode, as I don't think there's any kind of namespacing enforced for modes at this point.