Add missing shortcuts for WORD left/right in Select #1107
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.
This PR adds
<C-Left>
and<C-Right>
actions in Select mode to move to the previous/next WORD. It adds new actions, similar to the existing actions for<C-Left>
and<C-Right>
for Visual mode. They're separate actions because the Visual mode actions are also mapped to theB
shortcut, which isn't valid for Select.Note that the tests don't all follow Vim behaviour. Firstly, there is a separate bug/mis-implementation that entering select with e.g.
gh
will move the caret one character to the right in IdeaVim, but not in Vim. This will be addressed in a separate PR that does a bunch of work around Select mode, inclusive/exclusive selection, off-by-one errors and so on. Secondly, IdeaVim treats Select mode as always being "exclusive", as if:set selection=exclusive
has been called. This alters the selection rules and causes differences in behaviour. This is less likely to be fixed as it's much more intuitive behaviour.