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 m textobject for pair under cursor #961

Merged
merged 1 commit into from
Nov 11, 2021

Conversation

Omnikar
Copy link
Contributor

@Omnikar Omnikar commented Nov 2, 2021

Closes #956.

@archseer archseer requested a review from sudormrfbin November 3, 2021 03:08
Copy link
Member

@sudormrfbin sudormrfbin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also needs to work with the nearest surround pair even if the cursor is not exactly on a surround character. For example if I press mim on any character between the braces in this text

{sentance}

it should automatically detect the braces as the nearest surround pair and select the text inside it.

@Omnikar
Copy link
Contributor Author

Omnikar commented Nov 3, 2021

Hm, that's going to be tougher to implement.

@EpocSquadron
Copy link
Contributor

Hm, that's going to be tougher to implement.

I think we should leave it at the current functionality. There's a bit of precedent, in that pressing mm only works if you are on a character. I don't disagree that it would be cool for it to pick the first braces around the cursor though, so we should open a new issue to explore how that should work.

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.

Make m a special textobject identifier representing pair under cursor
4 participants