Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing shortcuts for WORD left/right in Select #1107

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

citizenmatt
Copy link
Member

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 the B 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.

@citizenmatt citizenmatt force-pushed the feature/word-motion-select-mode branch from 6bf4994 to 164eabc Compare February 21, 2025 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant