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 ensure_selections key to ensure selections are in forward direction #1332

Closed
NNBnh opened this issue Dec 22, 2021 · 2 comments · Fixed by #1393
Closed

Add ensure_selections key to ensure selections are in forward direction #1332

NNBnh opened this issue Dec 22, 2021 · 2 comments · Fixed by #1393
Labels
A-keymap Area: Keymap and keybindings C-enhancement Category: Improvements

Comments

@NNBnh
Copy link
Contributor

NNBnh commented Dec 22, 2021

I'm miss this feature from Kakoune, information on this from Kakoune's keys docs:

<a-:>
ensure selections are in forward direction (cursor after anchor)

@NNBnh NNBnh added the C-enhancement Category: Improvements label Dec 22, 2021
@kirawi kirawi added the A-keymap Area: Keymap and keybindings label Dec 23, 2021
@dead10ck
Copy link
Member

Is flip_selections not enough?

@NNBnh
Copy link
Contributor Author

NNBnh commented Dec 23, 2021

Is flip_selections not enough?

Nope, ensure_selections is pretty helpful when we remap key bind or record a macro and want it's behavior to be consistent.

This is also on Archseer's keys todo list, so I thinks this key deserve to be implemented.

archseer pushed a commit that referenced this issue Dec 29, 2021
* feat(commands): ensure_selections_forward

Add command that ensures that selections are in forward direction.

Fixes: #1332

* Add keybinding for ensure_selections_forward

Add `A-:` keybinding for the ensure_selections_forward command.

* Re-use range.flip for flip_selections command
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-keymap Area: Keymap and keybindings C-enhancement Category: Improvements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants