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

Inconsistencies when selecting closest surrounding pair to cursor #3615

Closed
icholy opened this issue Aug 31, 2022 · 4 comments · Fixed by #8294
Closed

Inconsistencies when selecting closest surrounding pair to cursor #3615

icholy opened this issue Aug 31, 2022 · 4 comments · Fixed by #8294
Labels
A-helix-term Area: Helix term improvements C-bug Category: This is a bug

Comments

@icholy
Copy link

icholy commented Aug 31, 2022

Summary

The mam command seems broken.

Reproduction Steps

  • mam has no effect here. I expected it to select the [ ... ] pair.

image

  • mam has no effect here. I expected it to select the [ ... ] pair.

image

  • mam selects the parent [ ... ] pair. I expected to select the { ... } pair.

image

  • mam selects the { ... } pair. This seems correct.

image

Helix log

No response

Platform

Linux

Terminal Emulator

alacritty 0.9.0

Helix Version

helix 22.05 (83f177d)

@icholy icholy added the C-bug Category: This is a bug label Aug 31, 2022
@archseer
Copy link
Member

archseer commented Sep 1, 2022

This is intentional, it's supposed to select the next outer pair? I think you're looking for vmm

@icholy
Copy link
Author

icholy commented Sep 8, 2022

@archseer then why does the last example not select the surrounding [ ... ] ?

@the-mikedavis
Copy link
Member

Looks like there might be an off-by-one: mam on a closing pair surrounds that pair instead of the parent

@the-mikedavis the-mikedavis added the A-helix-term Area: Helix term improvements label Sep 8, 2022
@morlinbrot
Copy link
Contributor

This is intentional, it's supposed to select the next outer pair? I think you're looking for vmm

Is it possible to discuss changing this default behaviour? At least to me, this feels very unintuitive. Sure, you can use vmm when on a pair but now I have to commit two different things to muscle memory, one for in, one for on the pair.

I think it would be more intutitive to make mim/mam always select, no matter if on opener, closer or inside the pair.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements C-bug Category: This is a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants